Command help need me fast - 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: Command help need me fast (
/showthread.php?tid=263853)
Command help need me fast -
boyan96 - 23.06.2011
in my server i have this command
PHP код:
if(strcmp(cmd, "/makedonator", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /makedonator [Playerid/PartOfName] [donate rank]");
return 1;
}
new para1;
new level;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1337)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
PlayerInfo[para1][pDonateRank] = level;
format(string, sizeof(string), "* made you %d level VIP", level, PlayerName(playerid));
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* you make %s level %d VIP.", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not Admin!");
}
}
return 1;
}
to make someone donator i need to put him the id of the player and donate level how i can make to pu t only id and automatically to give him 3 level donator
Re: Command help need me fast -
boyan96 - 23.06.2011
ideas
Re: Command help need me fast -
boyan96 - 24.06.2011
help
Re: Command help need me fast -
Ricop522 - 24.06.2011
PHP код:
if(strcmp(cmd, "/makedonator", true) == 0) {
if(IsPlayerConnected(playerid)) {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /makedonator [Playerid/PartOfName]");
new para1;
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1337) {
if(IsPlayerConnected(para1)) {
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
PlayerInfo[para1][pDonateRank] = 3;
format(string, sizeof(string), "* made you 3 level VIP", PlayerName(playerid));
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* you make %s level 3 VIP.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not Admin!");
}
}
return 1;
}
Re: Command help need me fast -
boyan96 - 24.06.2011
C:\DOCUME~1Desktop\GANGWA~1.PWN(9810) : error 017: undefined symbol "level"
C:\DOCUME~1Desktop\GANGWA~1.PWN(9812) : error 017: undefined symbol "level"
Re: Command help need me fast -
Skaizo - 24.06.2011
#define level or #new level