whats wrong?
#1

Quote:

if(!strcmp(cmdtext, "/tazeris", true,)
{
new vardas[MAX_PLAYER_NAME];
new tid = GetPlayeridMid(vardas);
strmid(vardas,GetArgument(1, cmdtext,0),0,MAX_PLAYER_NAME);
if(playerDB[playerid][specialybe]!=1){SendClientMessage(playerid,BALTA,"* Si komanda TIK Policijos Pareigunams"); return 1;}
if(!strcmp(vardas, "0", true) ){SendClientMessage(playerid, BALTA, "* Naudojimas: /tazeris [Vardas]"); return 1;}
if(IsPlayerInAnyVehicle(tid)) return SendClientMessage(playerid,BALTA,"* Sis zaidejas yra masinoje!");
if (tid == INVALID_PLAYER_ID){ SendClientMessage(playerid, BALTA, "* Tokio zaidejo nera"); return 1;}
if(Tazered[playerid] == true) return SendClientMessage(playerid,BALTA,"* Sis zaidejas jau yra nukratytas.");
new Float:Coo[3];
GetPlayerPos(tid,Coo[0],Coo[1],Coo[2]);
if(!PlayerToPoint(3, playerid, Coo[0],Coo[1],Coo[2])){SendClientMessage(playerid, BALTA, "* Sis zaidejas yra per toli."); return 1;}
TogglePlayerControllable(tid,0);
SendClientMessage(tid,BALTA,"* Jus buvote nukratytas Policijos Pareiguno!");
SendClientMessage(playerid,BALTA,"* Zmogus sekmingai nukratytas.");
Tazered[tid] = true;

TazerLaikas[tid] = SetTimerEx("NaikinamTazeri",60*1000,0,"d",tid);

return 1;
}

Quote:

if(!strcmp(cmdtext, "/get", true,4))
{
if(cmdtext[4]==0){SendClientMessage(playerid,RAUDONA, "* Gauti zaideja: /get [dalis vardo]"); return 1;}
new vardas[MAX_PLAYER_NAME];
new zvardas[MAX_PLAYER_NAME];
new id = GetPlayeridMid(vardas);
new string[70];
GetPlayerName(id,vardas,sizeof(vardas));
GetPlayerName(playerid,zvardas,sizeof(zvardas));
strmid(vardas,cmdtext[5],0,MAX_PLAYER_NAME);
if (id == INVALID_PLAYER_ID){ SendClientMessage(playerid,RAUDONA, "* Tokio zaidejo nera"); return 1;}
if (GetPlayerVirtualWorld(playerid)>0){SendClientMess age(playerid,RAUDONA, "* Tu namuose, pakviesk zaidejus.. nekilnok ju"); return 1;}
if (playerDB[id][ikalintas]) {SendClientMessage(playerid,RAUDONA, "* Zaidejas kalejime."); return 1;}
if (playerDB[id][surakintas]) {SendClientMessage(playerid,RAUDONA, "* Zaidejas yra surakintas."); return 1;}
SetPlayerInterior(id,GetPlayerInterior(playerid));
format(string,sizeof(string),"* %s Jus atsiteleportavo pas save!",zvardas);
SendClientMessage(id,ZALIA3,string);
new Float:tempcoo[3];
GetPlayerPos(playerid,tempcoo[0],tempcoo[1],tempcoo[2]);
SetPlayerPos(id,tempcoo[0],tempcoo[1],tempcoo[2]);
SetCameraBehindPlayer(id);
return 1;
}

and when i use /get <name> its say, that player is didnt founded, but player is online. with tazer, using /tazeris Aleksej, and when i use it ( its not me, its another ppl ) its mean, that player is not founded.
Reply
#2

BUMP. 24h's over!
Reply
#3

Whats all this strange way of scripting... use sscanf or else strtok..
sscanf uses ID/Player Name so thats simple..
Reply
#4

hmm, how can i use sscanf, without ZCMD? please no plugin..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)