Help command one time - 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 command one time (
/showthread.php?tid=339145)
Help command one time -
lonako45 - 02.05.2012
This is the command:
PHP код:
if(strcmp(tmp, "GiveMoney", true) == 0 || strcmp(tmp, "Gm", true) == 0)
{
if(GetAdminLevel(playerid) < 1 && !IsPlayerAdmin(playerid) && GetAdminSpay(playerid) < 1 && GetTempAdminLevel(playerid) < 1) return SendClientMessage(playerid, White, "шоъ дрйдем щмк роелд");
if(activity == 0) return SendClientMessage(playerid, White, "лгй мъъ мщзчп фшс цшйлд мдйеъ фтймеъ оефтмъ");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, yellow, "/Activity GiveMoney(Gm) [id] [Money] :цешъ дщйоещ");
id = strval(tmp);
tmp1 = strtok(cmdtext, idx);
if(!strlen(tmp1)) return SendClientMessage(playerid, yellow, "/Activity GiveMoney ID [Money] :цешъ дщйоещ");
any = strval(tmp1);
if(any < 1 || any > 150000) return SendClientMessage(playerid, White, "слен дфшс зййб мдйеъ бйп 150000 - 1");
any = strval(tmp1);
GivePlayerMoney(id, any);
SetPVarInt(playerid, "GivenMoney", any);
format(string, sizeof(string),"%d рйцз бфтймеъ ечйбм аъ дслен %s дщзчп", any, GetName(id));
SendClientMessageToAll(0x48c14ff, string);
return 1;
}
I want if i do /GiveMoney 0 100000
its give him but if i write the command again to id its write me : This player get money!
Get it ?
Help ?
Re: Help command one time -
lonako45 - 02.05.2012
Help please ?
Re: Help command one time -
ViniBorn - 02.05.2012
pawn Код:
if(strcmp(tmp, "GiveMoney", true) == 0 || strcmp(tmp, "Gm", true) == 0)
{
if(GetAdminLevel(playerid) < 1 && !IsPlayerAdmin(playerid) && GetAdminSpay(playerid) < 1 && GetTempAdminLevel(playerid) < 1) return SendClientMessage(playerid, White, "шоъ дрйдем щмк роелд");
if(activity == 0) return SendClientMessage(playerid, White, "лгй мъъ мщзчп фшс цшйлд мдйеъ фтймеъ оефтмъ");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, yellow, "/Activity GiveMoney(Gm) [id] [Money] :цешъ дщйоещ");
id = strval(tmp);
tmp1 = strtok(cmdtext, idx);
if(!strlen(tmp1)) return SendClientMessage(playerid, yellow, "/Activity GiveMoney ID [Money] :цешъ дщйоещ");
any = strval(tmp1);
if(any < 1 || any > 150000) return SendClientMessage(playerid, White, "слен дфшс зййб мдйеъ бйп 150000 - 1");
any = strval(tmp1);
GivePlayerMoney(id, any);
SetPVarInt(id , "GivenMoney", any);
format(string, sizeof(string),"%d рйцз бфтймеъ ечйбм аъ дслен %s дщзчп", any, GetName(id));
SendClientMessageToAll(0x48c14ff, string);
return 1;
}