Vice Underdogs

Scripting => Scripting Support => Topic started by: Zeke on October 24, 2011, 09:26:50 pm

Title: [PAWNO]cmd format message problems
Post by: Zeke on October 24, 2011, 09:26:50 pm
So basicly the problem is the format message of the cmd its bugged.

example:

with player name typed; Officer [VU]aXXo suspected [VU_R]Zeke Reason: testke

with player ID typed; Officer [VU]aXXo suspected [VU_R]Zeke Reason: test

it add the last 2 (sometimes 3) letters of the suspects name

here is my script

Code: [Select]
else if(strcmp(cmd,"sus",true) == 0)
{
new plr;
tmp = strtok(cmdtext, idx);
plr = FindPlayerIDFromString(tmp);
new reason[256]; reason = strtok(cmdtext, idx);
if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
    else if(PlayerInfo[playerid][Cop] != 1) SendClientMessage(playerid, COLOR_RED, "You are not a Police officer");
else if (!strlen(tmp)) SendClientMessage(playerid,COLOR_RED,"USAGE: /c sus [Nick/ID] [Reason]");
else if (plr == INACTIVE_PLAYER_ID) SendClientMessage(playerid,COLOR_RED,"Error: Unknown player");
else if(PlayerInfo[plr][Wanted] >= 1) SendClientMessage(playerid,COLOR_RED,"Suspect is already wanted...");
else
{
new szMsg[256];
        format(szMsg,sizeof(szMsg),"Officer %s suspected %s Reason:%s",gPlayers[playerid],gPlayers[plr],cmdtext[6]);
   SendClientMessageToAll(COLOR_GREEN,szMsg);
new surmsg[256];
format(surmsg,sizeof(surmsg),"%s suspected you!!!",gPlayers[playerid]);
SendClientMessage(plr,COLOR_YELLOW,surmsg);
PlayerInfo[plr][Wanted] = 1;
}
return 1;
}

ye and i know what will all of u say "scrap it and convert it to squirrel" but NEIN ( personal reasons)




Title: Re: [PAWNO]cmd format message problems
Post by: stormeus on October 25, 2011, 07:09:42 pm
-------------- BEGIN HARSH CRITIQUE --------------


--------------  END HARSH CRITIQUE  --------------
Title: Re: [PAWNO]cmd format message problems
Post by: morphine on October 26, 2011, 09:29:57 pm
-------------------------------- Begin Rant --------------------------------

scrap it and convert it to squirrel" but JA ( personal reasons)
-------------------------------- End Rant --------------------------------