Deejaybwg Posted May 29, 2011 Posted May 29, 2011 Problema /afk.Cand cineva da /afk, apare pe ecran "NAME este afk acum." si asa ramane.Cum fac sa ramana doar 2 secunde sau foarte putin? Ca nu e ok sa ramana scris.. :undecided: www.youtube.com/thebwgg
xxSPEEDYxx Posted May 29, 2011 Posted May 29, 2011 uite aici:[pawn]new afk[256]; GetPlayerName(playerid,name, sizeof(name)); format(afk, sizeof(afk), "~r~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~r~ %s ~w~ will AFK.", name); GameTextForAll(afk,4000,3);[/pawn] Fara reclama in semnatura!
Deejaybwg Posted May 29, 2011 Author Posted May 29, 2011 Am pus:new afk[256]; GetPlayerName(playerid,name, sizeof(name)); format(afk, sizeof(afk), "~r~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~r~ %s ~w~ will AFK.", name); GameTextForAll(afk,4000,3);in locul la asta:afk = TextDrawCreate(17.0, 280.0, "~w~este acum ~r~AFK"); TextDrawBackgroundColor(afk, 255); TextDrawFont(afk, 2); TextDrawUseBox(afk, 1); TextDrawBoxColor(afk, 0x00000044); TextDrawTextSize(afk, 270.000000, 350.000000); TextDrawAlignment(afk, 0); TextDrawLetterSize(afk, 0.299999,1.000000); TextDrawColor(afk,0x000000ff); TextDrawSetOutline(afk, 1); TextDrawSetProportional(afk, 1);Si imi da erori. www.youtube.com/thebwgg
Deejaybwg Posted May 29, 2011 Author Posted May 29, 2011 Sorry pentru Reply, dar un raspuns ? www.youtube.com/thebwgg
[RSD]TheBoss Posted May 29, 2011 Posted May 29, 2011 Am pus:new afk[256]; GetPlayerName(playerid,name, sizeof(name)); format(afk, sizeof(afk), "~r~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~r~ %s ~w~ este acum AFK.", name); GameTextForAll(afk,4000,3);afk = TextDrawCreate(17.0, 280.0, "~w~este acum ~r~AFK"); TextDrawBackgroundColor(afk, 255); TextDrawFont(afk, 2); TextDrawUseBox(afk, 1); TextDrawBoxColor(afk, 0x00000044); TextDrawTextSize(afk, 270.000000, 350.000000); TextDrawAlignment(afk, 0); TextDrawLetterSize(afk, 0.299999,1.000000); TextDrawColor(afk,0x000000ff); TextDrawSetOutline(afk, 1); TextDrawSetProportional(afk, 1);Si imi da erori. New GameMode In Development!-Romania Team Gang War-100%!...Datimi doua Motive afrimative de ce sa-l postez si-l postez...
Deejaybwg Posted May 29, 2011 Author Posted May 29, 2011 Si un raspuns ? :huh: www.youtube.com/thebwgg
cipperu Posted May 29, 2011 Posted May 29, 2011 Daca vrei iti dau eu /afk,/afklist,/back dar nu apare la tot server ca esti afk..apare doar in /afklist
Deejaybwg Posted May 29, 2011 Author Posted May 29, 2011 Multumesc, dar eu vreau sa nu mai ramana in continuu "NAME este afk acum". Vreau sa apara 2 secunde si sa dispara. :undecided: www.youtube.com/thebwgg
[RSD]TheBoss Posted May 29, 2011 Posted May 29, 2011 ma uite fak eu acum pe loc un afk[pawn]#include <a_samp>#include <Colors>new AFK[MAX_PLAYERS];public OnFilterScriptInit(){}public OnFilterScriptExit(){}public OnPlayerConnect(playerid){AFK[playerid]=0;}public OnPlayerDisconnect(playerid){AFK[playerid]=0;}public OnPlayerCommandText(playerid,cmdtext[]){if(strcmp("/AFK",cmdtext,true) ==0){new name[MAX_PLAYER_NAME];new msg[100];format(msg,sizeof(msg),"%s is now AFK!",name);SendClientMessageToAll(COLOR_RED,msg);TogglePlayerControllable(playerid,0);return 1;}if(strcmp("/back",cmdtext,true) ==0){new bakmsg[100];new name[MAX_PLAYER_NAME];format(bakmsg,sizeof(bakmsg),"%s has back",name);SendClientMessageToAll(COLOR_RED,bakmsg);TogglePlayerControllable(playerid,1);return 1;}return 1;}[/pawn]poftim acesta trimite un mesaj ca playerul este afk si il pune pe freeze facand ca nimeni sa nu-i mai poata lua din viata.);iti va trebuiColorshttp://www.xerom-zone.ro/index.php?action=includeaiciCare il iei mai sus New GameMode In Development!-Romania Team Gang War-100%!...Datimi doua Motive afrimative de ce sa-l postez si-l postez...
Deejaybwg Posted May 29, 2011 Author Posted May 29, 2011 Mi-a zis si Speedy ce trebuie sa scriu !!! DAR UNDEEEEEEEE ?Asta e comanda /afk a mea:afk = TextDrawCreate(17.0, 280.0, "~w~este acum ~r~AFK"); TextDrawBackgroundColor(afk, 255); TextDrawFont(afk, 2); TextDrawUseBox(afk, 1); TextDrawBoxColor(afk, 0x00000044); TextDrawTextSize(afk, 270.000000, 350.000000); TextDrawAlignment(afk, 0); TextDrawLetterSize(afk, 0.299999,1.000000); TextDrawColor(afk,0x000000ff); TextDrawSetOutline(afk, 1); TextDrawSetProportional(afk, 1);CUM FAC SA NU MAI RAMANA "....ESTE ACUM AFK" ? Sa ramana doar 2 secunde. www.youtube.com/thebwgg
IstuntmanI Posted May 29, 2011 Posted May 29, 2011 Mi-a zis si Speedy ce trebuie sa scriu !!! DAR UNDEEEEEEEE ?Asta e comanda /afk a mea:afk = TextDrawCreate(17.0, 280.0, "~w~este acum ~r~AFK"); TextDrawBackgroundColor(afk, 255); TextDrawFont(afk, 2); TextDrawUseBox(afk, 1); TextDrawBoxColor(afk, 0x00000044); TextDrawTextSize(afk, 270.000000, 350.000000); TextDrawAlignment(afk, 0); TextDrawLetterSize(afk, 0.299999,1.000000); TextDrawColor(afk,0x000000ff); TextDrawSetOutline(afk, 1); TextDrawSetProportional(afk, 1);CUM FAC SA NU MAI RAMANA "....ESTE ACUM AFK" ? Sa ramana doar 2 secunde.Inlocuieste aia cu un GameText, GameTextShowForAll: http://wiki.sa-mp.com/wiki/GameTextShowForAll
Deejaybwg Posted May 29, 2011 Author Posted May 29, 2011 1.Nu e nimic concret in link-ul pe care mi l-ai dat.2.Cum pot sa rezolv la /afk de la mine ?Adica sa raman cu acelasi sistem /afk, dar sa nu-mi ramana pe ecran knd scrie cineva /afk. www.youtube.com/thebwgg
[RSD]TheBoss Posted May 29, 2011 Posted May 29, 2011 [pawn]#include <a_samp>#include <Colors>new AFK[MAX_PLAYERS];public OnFilterScriptInit(){}public OnFilterScriptExit(){}public OnPlayerConnect(playerid){AFK[playerid]=0;}public OnPlayerDisconnect(playerid){AFK[playerid]=0;}public OnPlayerCommandText(playerid,cmdtext[]){if(strcmp("/AFK",cmdtext,true) ==0){new name[MAX_PLAYER_NAME];new msg[100];format(msg,sizeof(msg),"%s is now AFK!",name);GameTextForAll(msg,3000,2);TogglePlayerControllable(playerid,0);return 1;}if(strcmp("/back",cmdtext,true) ==0){new bakmsg[100];new name[MAX_PLAYER_NAME];format(bakmsg,sizeof(bakmsg),"%s has back",name);GameTextForAll(bakmsg,3000,2);TogglePlayerControllable(playerid,1);return 1;}return 1;}[/pawn]incearca asa si daca tot vrei cu textdrawdeci comanda[pawn]if(strcmp("/afk",cmdtext,true) ==0){new name[MAX_PLAYER_NAME];new afk[100];format(afk,sizeof(msg),"%s is now AFK!",name);afk = TextDrawCreate(17.0, 280.0, "~w~este acum ~r~AFK"); TextDrawBackgroundColor(afk, 255); TextDrawFont(afk, 2); TextDrawUseBox(afk, 1); TextDrawBoxColor(afk, 0x00000044); TextDrawTextSize(afk, 270.000000, 350.000000); TextDrawAlignment(afk, 0); TextDrawLetterSize(afk, 0.299999,1.000000); TextDrawColor(afk,0x000000ff); TextDrawSetOutline(afk, 1); TextDrawSetProportional(afk, 1);TogglePlayerControllable(playerid,0);SetTimer("DestroyTextDraw",3000,0);return 1;}[/pawn]si in afara oricarui callback adick Exp public OnPlayerConnect(...)...adicaexp public OnPlayerConnect(playerid) { } forward DestroyTextDraw(); public DestroyTextDraw() { TextDrawHideForAll(afk); } New GameMode In Development!-Romania Team Gang War-100%!...Datimi doua Motive afrimative de ce sa-l postez si-l postez...
Deejaybwg Posted May 29, 2011 Author Posted May 29, 2011 Am inlocuit if(strcmp(cmdtext, "/afk", true) == 0){GetPlayerName(playerid, dname, MAX_PLAYER_NAME);format(newtext, sizeof(newtext), "~b~%s,~w~este acum ~r~AFK", dname);TogglePlayerControllable(playerid,0);SetPlayerVirtualWorld(playerid, 5);TextDrawSetString(afk, newtext);HideDraw(playerid);TextDrawShowForAll(afk);SetTimerEx("HideDraw", 3000, 0, "i", playerid);KillTimer(Timer);Timer = SetTimer("healme", 100, 1);return 1;}Cu:if(strcmp("/afk",cmdtext,true) ==0){new name[MAX_PLAYER_NAME];new afk[100];format(afk,sizeof(msg),"%s is now AFK!",name);afk = TextDrawCreate(17.0, 280.0, "~w~este acum ~r~AFK"); TextDrawBackgroundColor(afk, 255); TextDrawFont(afk, 2); TextDrawUseBox(afk, 1); TextDrawBoxColor(afk, 0x00000044); TextDrawTextSize(afk, 270.000000, 350.000000); TextDrawAlignment(afk, 0); TextDrawLetterSize(afk, 0.299999,1.000000); TextDrawColor(afk,0x000000ff); TextDrawSetOutline(afk, 1); TextDrawSetProportional(afk, 1);TogglePlayerControllable(playerid,0);SetTimer("DestroyTextDraw",3000,0);return 1;}Si uite ce-a iesit:D:\[RSG]\gamemodes\RSG.pwn(3649) : warning 219: local variable "afk" shadows a variable at a preceding levelD:\[RSG]\gamemodes\RSG.pwn(3650) : error 017: undefined symbol "msg"D:\[RSG]\gamemodes\RSG.pwn(3650) : error 029: invalid expression, assumed zeroD:\[RSG]\gamemodes\RSG.pwn(3650) : warning 215: expression has no effectD:\[RSG]\gamemodes\RSG.pwn(3651) : error 033: array must be indexed (variable "afk")D:\[RSG]\gamemodes\RSG.pwn(3652) : error 035: argument type mismatch (argument 1)D:\[RSG]\gamemodes\RSG.pwn(3653) : error 035: argument type mismatch (argument 1)D:\[RSG]\gamemodes\RSG.pwn(3654) : error 035: argument type mismatch (argument 1)D:\[RSG]\gamemodes\RSG.pwn(3655) : error 035: argument type mismatch (argument 1)D:\[RSG]\gamemodes\RSG.pwn(3656) : error 035: argument type mismatch (argument 1)D:\[RSG]\gamemodes\RSG.pwn(3657) : error 035: argument type mismatch (argument 1)D:\[RSG]\gamemodes\RSG.pwn(3658) : error 035: argument type mismatch (argument 1)D:\[RSG]\gamemodes\RSG.pwn(3659) : error 035: argument type mismatch (argument 1)D:\[RSG]\gamemodes\RSG.pwn(3660) : error 035: argument type mismatch (argument 1)D:\[RSG]\gamemodes\RSG.pwn(3661) : error 035: argument type mismatch (argument 1) www.youtube.com/thebwgg
[RSD]TheBoss Posted May 29, 2011 Posted May 29, 2011 atunci fa asa[pawn]#include <a_samp>#include <Colors>new AFK[MAX_PLAYERS];public OnFilterScriptInit(){}public OnFilterScriptExit(){}public OnPlayerConnect(playerid){AFK[playerid]=0;}public OnPlayerDisconnect(playerid){AFK[playerid]=0;}public OnPlayerCommandText(playerid,cmdtext[]){if(strcmp("/AFK",cmdtext,true) ==0){new name[MAX_PLAYER_NAME];new msg[100];format(msg,sizeof(msg),"%s is now AFK!",name);GameTextForAll(msg,3000,2);TogglePlayerControllable(playerid,0);return 1;}if(strcmp("/back",cmdtext,true) ==0){new bakmsg[100];new name[MAX_PLAYER_NAME];format(bakmsg,sizeof(bakmsg),"%s has back",name);GameTextForAll(bakmsg,3000,2);TogglePlayerControllable(playerid,1);return 1;}[/pawn] New GameMode In Development!-Romania Team Gang War-100%!...Datimi doua Motive afrimative de ce sa-l postez si-l postez...
IstuntmanI Posted May 29, 2011 Posted May 29, 2011 TheBoss" post="75042" timestamp="1306691652"]atunci fa asa[pawn]#include <a_samp>#include <Colors>new AFK[MAX_PLAYERS];public OnFilterScriptInit(){}public OnFilterScriptExit(){}public OnPlayerConnect(playerid){AFK[playerid]=0;}public OnPlayerDisconnect(playerid){AFK[playerid]=0;}public OnPlayerCommandText(playerid,cmdtext[]){if(strcmp("/AFK",cmdtext,true) ==0){new name[MAX_PLAYER_NAME];new msg[100];format(msg,sizeof(msg),"%s is now AFK!",name);GameTextForAll(msg,3000,2);TogglePlayerControllable(playerid,0);return 1;}if(strcmp("/back",cmdtext,true) ==0){new bakmsg[100];new name[MAX_PLAYER_NAME];format(bakmsg,sizeof(bakmsg),"%s has back",name);GameTextForAll(bakmsg,3000,2);TogglePlayerControllable(playerid,1);return 1;}[/pawn]AJUTA-L SA-L FACA PE AL LUI ! NU II FACE TU ALTUL ! Daca nu stii, nu te mai baga !In loc de [pawn]if(strcmp("/afk",cmdtext,true) ==0){new name[MAX_PLAYER_NAME];new afk[100];format(afk,sizeof(msg),"%s is now AFK!",name);afk = TextDrawCreate(17.0, 280.0, "~w~este acum ~r~AFK"); TextDrawBackgroundColor(afk, 255); TextDrawFont(afk, 2); TextDrawUseBox(afk, 1); TextDrawBoxColor(afk, 0x00000044); TextDrawTextSize(afk, 270.000000, 350.000000); TextDrawAlignment(afk, 0); TextDrawLetterSize(afk, 0.299999,1.000000); TextDrawColor(afk,0x000000ff); TextDrawSetOutline(afk, 1); TextDrawSetProportional(afk, 1);TogglePlayerControllable(playerid,0);SetTimer("DestroyTextDraw",3000,0);return 1;}[/pawn]pune[pawn]if(strcmp("/afk",cmdtext,true) ==0){ new name[MAX_PLAYER_NAME], string[128]; GetPlayerName( playerid, name, MAX_PLAYER_NAME ); format(string, 128, "~w~%s is now AFK!",name); GameTextForAll( string, 2000, 1 ); TogglePlayerControllable(playerid,0); SetTimer("DestroyTextDraw",3000,0); return 1;}[/pawn]
Deejaybwg Posted May 29, 2011 Author Posted May 29, 2011 Stuntman,am pus cum mi-ai zis si mi-a dat un warning:D:\[RSG]\gamemodes\RSG.pwn(3648) : warning 219: local variable "string" shadows a variable at a preceding level www.youtube.com/thebwgg
IstuntmanI Posted May 29, 2011 Posted May 29, 2011 Stuntman,am pus cum mi-ai zis si mi-a dat un warning:D:\[RSG]\gamemodes\RSG.pwn(3648) : warning 219: local variable "string" shadows a variable at a preceding level[pawn]if(strcmp("/afk",cmdtext,true) ==0){ new name[MAX_PLAYER_NAME], string[128]; GetPlayerName( playerid, name, MAX_PLAYER_NAME ); format(string, 128, "~w~%s is now AFK!",name); GameTextForAll( string, 2000, 1 ); TogglePlayerControllable(playerid,0); SetTimer("DestroyTextDraw",3000,0); return 1;}[/pawn]inlocuieste cu[pawn]if(strcmp("/afk",cmdtext,true) ==0){ new name[MAX_PLAYER_NAME], afkstringa[128]; GetPlayerName( playerid, name, MAX_PLAYER_NAME ); format(afkstringa, 128, "~w~%s is now AFK!",name); GameTextForAll( afkstringa, 2000, 1 ); TogglePlayerControllable(playerid,0); return 1;}[/pawn]
Question
Deejaybwg
Problema /afk.
Cand cineva da /afk, apare pe ecran "NAME este afk acum." si asa ramane.
Cum fac sa ramana doar 2 secunde sau foarte putin? Ca nu e ok sa ramana scris.. :undecided:
www.youtube.com/thebwgg
18 answers to this question
Recommended Posts