Donator - 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: Donator (
/showthread.php?tid=176354)
Donator -
thomas.. - 12.09.2010
Hey, can someone make a command where rcon admin types /makedonator then the player is Donator == 1;
Re: Donator -
Vince - 12.09.2010
One thread is enough.
Re: Donator -
thomas.. - 12.09.2010
Help would be nice...
Re: Donator -
Sky4D - 12.09.2010
Haven't done anything with strcmp for a while, but here's my go at it.
pawn Code:
if(strcmp(cmd, "/makedonator", true) == 0) {
new newDonator;
tmp = strtok(cmdtext, idx);
newDonator = ReturnUser(tmp);
if(IsPlayerConnected(newDonator))
{
if(IsPlayerAdmin(playerid))
{
Donator[newDonator] = 1;
}
else return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not an Administrator!");
}
return 1;
}
EDITED - Added the part where you have to be an Administrator.
Re: Donator -
thomas.. - 12.09.2010
Quote:
Originally Posted by Sky4D
Haven't done anything with strcmp for a while, but here's my go at it.
pawn Code:
if(strcmp(cmd, "/makedonator", true) == 0) { new newDonator; tmp = strtok(cmdtext, idx); newDonator = ReturnUser(tmp); if(IsPlayerConnected(newDonator)) { if(IsPlayerAdmin(playerid)) { Donator[newDonator] = 1; } else return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not an Administrator!"); } return 1; }
EDITED - Added the part where you have to be an Administrator.
|
thanks :P p.s: i work with dcmd, but it was easy to convert
Re: Donator -
Cameltoe - 12.09.2010
Quote:
Originally Posted by Vince
|
Next time, don't make several threads to get your shit done .. wait 12 hours then just spam your old thread.
Re: Donator -
Sky4D - 12.09.2010
Quote:
Originally Posted by thomas..
thanks :P p.s: i work with dcmd, but it was easy to convert
|
Do you use SSCANF too? It could have saved me alot of effort if you do.. lol.
In the future, please state in your post which command processor you use.
Re: Donator -
thomas.. - 13.09.2010
Quote:
Originally Posted by Sky4D
Haven't done anything with strcmp for a while, but here's my go at it.
pawn Code:
if(strcmp(cmd, "/makedonator", true) == 0) { new newDonator; tmp = strtok(cmdtext, idx); newDonator = ReturnUser(tmp); if(IsPlayerConnected(newDonator)) { if(IsPlayerAdmin(playerid)) { Donator[newDonator] = 1; } else return SendClientMessage(playerid, COLOR_RED, "ERROR: You are not an Administrator!"); } return 1; }
EDITED - Added the part where you have to be an Administrator.
|
gives errors...
anyway, that was 2 days ago.. dont see why i got a infraction, cause to me 12hrs < 2days...