SA-MP Forums Archive
whats wrong with this - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: whats wrong with this (/showthread.php?tid=175490)



whats wrong with this - farris - 10.09.2010

it just says Gir Says: when it should say Gir Says: text here
Quote:

if(strcmp(cmd, "/girtalk", true) == 0)
{
if(!strcmp(PlayerName(playerid), "Joseph_Cortez" ))
{
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "Gir Says:", cmdtext[6]);
SendClientMessageToAll(LIGHTBLUE, str);
}
else SendClientMessage(playerid, LIGHTBLUE, "You are not a high enough Admin!");
return 1;
}




Re: whats wrong with this - ••• ĤБĶБM ••• - 10.09.2010

pawn Код:
if(strcmp(cmd, "/girtalk", true) == 0)
{
if(!strcmp(PlayerName(playerid), "Joseph_Cortez" ))
{
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "Gir Says: %s", cmdtext[6]);
SendClientMessageToAll(LIGHTBLUE, str);
}
else SendClientMessage(playerid, LIGHTBLUE, "You are not a high enough Admin!");
return 1;
}
Try that. Not pretty sure that it will work, just gave it a go. Test it, and leave me a reply please. I could increase my experience every time I help anyone.


Re: whats wrong with this - DiddyBop - 10.09.2010

use dcmd, or zcmd, Is much better.

pawn Код:
CMD:girtalk(playerid,params[]);
{
if(!strcmp(PlayerName(playerid), "Joseph_Cortez" ))
{
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "Gir Says: %s", params);
SendClientMessageToAll(LIGHTBLUE, str);
}
else SendClientMessage(playerid, LIGHTBLUE, "You are not a high enough Admin!");
return 1;
}
Is that simple.


Re: whats wrong with this - farris - 10.09.2010

it was actually :
format(str, sizeof(str), "Gir Says: %s", cmdtext[8]);
other than that its good