Team Help. - 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: Team Help. (
/showthread.php?tid=124607)
Team Help. -
TheNotorius - 31.01.2010
Hey, im trying to make a /donators command
when you type it, it says the player To "Donator"
And when i type it, it wont work :S
Please Help?
heres Code:
pawn Код:
if(strcmp(cmd, "/donator", true) == 0) //
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, ORANGE, "USAGE: /donator [playername/id]");
SendClientMessage(playerid, ORANGE, "FUNCTION: Will Change The Players Team.");
return 1;
}
new targetid = ReturnUser(tmp);
if(targetid != INVALID_PLAYER_ID)
{
SetSpawnInfo( playerid, 0, 3, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
SendClientMessage(playerid,WHITE,"An Admin Has Changed Your Team To: Donator");
}
else if(giveplayerid == INVALID_PLAYER_ID)
{
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid, RED, string);
}
return 1;
}
Re: Team Help. -
E-Rage - 31.01.2010
Quote:
Originally Posted by ╚»★«[LSTDM
Lucifier»★«╝ ]
Hey, im trying to make a /donators command
when you type it, it says the player To "Donator"
And when i type it, it wont work :S
Please Help?
heres Code:
pawn Код:
if(strcmp(cmd, "/donator", true) == 0) // { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, ORANGE, "USAGE: /donator [playername/id]"); SendClientMessage(playerid, ORANGE, "FUNCTION: Will Change The Players Team."); return 1; } new targetid = ReturnUser(tmp); if(targetid != INVALID_PLAYER_ID) { SetSpawnInfo( playerid, 0, 3, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 ); SendClientMessage(playerid,WHITE,"An Admin Has Changed Your Team To: Donator"); }
else if(giveplayerid == INVALID_PLAYER_ID) { format(string, sizeof(string), "%d is not an active player.", giveplayerid); SendClientMessage(playerid, RED, string); } return 1; }
|
wow that's a crashed pawn :P
Re: Team Help. -
TheNotorius - 31.01.2010
LOL It Doesnt Crash it
Re: Team Help. -
[HiC]TheKiller - 31.01.2010
Change
pawn Код:
SetSpawnInfo( playerid, 0, 3, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
SendClientMessage(playerid,WHITE,"An Admin Has Changed Your Team To: Donator")
To
pawn Код:
SetSpawnInfo(targetid, 0, 3, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
SendClientMessage(targetid,WHITE,"An Admin Has Changed Your Team To: Donator")
Re: Team Help. -
TheNotorius - 31.01.2010
Quote:
Originally Posted by [HiC
TheKiller ]
Change
pawn Код:
SetSpawnInfo( playerid, 0, 3, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 ); SendClientMessage(playerid,WHITE,"An Admin Has Changed Your Team To: Donator")
To
pawn Код:
SetSpawnInfo(targetid, 0, 3, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 ); SendClientMessage(targetid,WHITE,"An Admin Has Changed Your Team To: Donator")
|
Thanks, But isnt like supposed to kill me? lol
Re: Team Help. -
TheNotorius - 17.02.2010
Bump: Still Doesnt Work :/
Re: Team Help. -
whitedragon - 17.02.2010
Quote:
Originally Posted by ╚»★«[LSTDM
Lucifier»★«╝ ]
Hey, im trying to make a /donators command
when you type it, it says the player To "Donator"
And when i type it, it wont work :S
Please Help?
heres Code:
pawn Код:
if(strcmp(cmd, "/donator", true) == 0) // { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, ORANGE, "USAGE: /donator [playername/id]"); SendClientMessage(playerid, ORANGE, "FUNCTION: Will Change The Players Team."); return 1; } new targetid = ReturnUser(tmp); if(targetid != INVALID_PLAYER_ID) { SetSpawnInfo( playerid, 0, 3, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 ); SendClientMessage(playerid,WHITE,"An Admin Has Changed Your Team To: Donator"); }
else if(giveplayerid == INVALID_PLAYER_ID) { format(string, sizeof(string), "%d is not an active player.", giveplayerid); SendClientMessage(playerid, RED, string); } return 1; }
|
Try this
pawn Код:
if(strcmp(cmd, "/donator", true) == 0) //
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, ORANGE, "USAGE: /donator [playername/id]");
SendClientMessage(playerid, ORANGE, "FUNCTION: Will Change The Players Team.");
return 1;
}
new targetid = ReturnUser(tmp);
if(targetid == INVALID_PLAYER_ID)
{
format(string, sizeof(string), "%d is not an active player.", giveplayerid);
SendClientMessage(playerid, RED, string);
}
SetSpawnInfo( playerid, 0, 3, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0 );
SendClientMessage(playerid,WHITE,"An Admin Has Changed Your Team To: Donator");
return 1;
}