help onplayercommandtext - 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: help onplayercommandtext (
/showthread.php?tid=556648)
help onplayercommandtext -
AgusZ - 11.01.2015
hi, can u help me i dont know cause of this problem
Код:
C:\Users\Agus Purwantoro\Desktop\SAMP\gamemodes\gm(325) : error 017: undefined symbol "text"
Код:
if(strcmp(cmdtext, "/ad", true) == 0 || strcmp(cmdtext, "/advertise", true) == 0)
{
new string[128], name[64] ;
GetPlayerName(playerid, name, sizeof(name));
if(sscanf(cmdtext, "s[128]", cmdtext)) return SendClientMessage(playerid, COLOR_GRAY, "{F300FF}***AdmCmd {0049FF}: {FFFFFF}USAGE {0049FF}: {FFFFFF}/ad [text]");
if(ServerAdvert == 1)
{
SendClientMessage(playerid, COLOR_RED, "***Only one advertisement every 60 seconds!");
}
else
{
ServerAdvert = 1;
format(string, sizeof(string), "{F81414}[ SERVER ] {0049FF}: {FFFFFF}%s {00C0FF}Contact {0049FF}: {FFFFFF}%s(%i)", cmdtext, text, name, playerid);
SendClientMessageToAll(COLOR_LIME, string);
SetTimer("AdTimer", 60000, false);
GivePlayerMoney(playerid, -10000);
}
return 1;
Re: help onplayercommandtext -
Jihanz - 11.01.2015
kamu orang mana
Re: help onplayercommandtext -
Accent - 11.01.2015
Код:
if(sscanf(cmdtext, "s[128]", cmdtext))
Change to
Код:
if(sscanf(params, "s[128]", name))
You didnt define cmdtext anywhere.I just added name so it wont give any error.Change it.
Re: help onplayercommandtext -
AgusZ - 11.01.2015
jawa
Re: help onplayercommandtext -
fatlirmorina - 11.01.2015
Код:
if(strcmp(cmdtext, "/ad", true) == 0 || strcmp(cmdtext, "/advertise", true) == 0)
{
new string[128], name[64] ;
GetPlayerName(playerid, name, sizeof(name));
if(sscanf(params, "s[128]", name)) return SendClientMessage(playerid, COLOR_GRAY, "{F300FF}***AdmCmd {0049FF}: {FFFFFF}USAGE {0049FF}: {FFFFFF}/ad [text]");
if(ServerAdvert == 1)
{
SendClientMessage(playerid, COLOR_RED, "***Only one advertisement every 60 seconds!");
}
else
{
ServerAdvert = 1;
format(string, sizeof(string), "{F81414}[ SERVER ] {0049FF}: {FFFFFF}%s {00C0FF}Contact {0049FF}: {FFFFFF}%s(%i)", cmdtext, text, name, playerid);
SendClientMessageToAll(COLOR_LIME, string);
SetTimer("AdTimer", 60000, false);
GivePlayerMoney(playerid, -10000);
}
return 1;
}