Special nickname problem.. - 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)
+--- Thread: Special nickname problem.. (
/showthread.php?tid=580839)
Special nickname problem.. -
ProRakNet - 08.07.2015
if(strcmp(cmd, "/command", true) == 0)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
if(strfind(pName,"David", true) != -1){
for(new i=0; i<=15; i++){ SendClientMessage(playerid, -1, "Do not nick David!"); }
// function
}
return 1;
}
Command does not work properly.
AW: Special nickname problem.. -
Kaliber - 08.07.2015
Do it like this:
PHP код:
if(strcmp(cmd, "/command", true) == 0)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
if(strcmp(pName,"David") != 0) return SendClientMessage(playerid, -1, "Do not nick David!");
//function
return 1;
}
Re: Special nickname problem.. -
ProRakNet - 08.07.2015
Thanks, worked.