Setteam Commands - 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: Setteam Commands (
/showthread.php?tid=345530)
Setteam Commands -
Devilxz97 - 25.05.2012
hey how can i make an /setteam [playerid/PartOfName] [TeamID]
Commands ?
can someone make it for me ? :\ im tired searching it all i found is like this
/setteam 1-500
o.O i cant understand ! 1-500 LOL
so :\ can someone ?
Re: Setteam Commands -
ViniBorn - 25.05.2012
strtok or sscanf?
Re: Setteam Commands -
Devilxz97 - 25.05.2012
sscanf
Re: Setteam Commands -
ViniBorn - 25.05.2012
pawn Код:
CMD:setteam(playerid, params[])
{
new ID,TeamID;
if(sscanf(params, "rd", ID,TeamID))
return SendClientMessage(playerid, -1, "/setteam [playerid/PartOfName] [TeamID]");
if(!IsPlayerConnected(ID))
return SendClientMessage(playerid, -1, "Offline");
Team[ID] = TeamID;//Example
return true;
}
Re: Setteam Commands -
Devilxz97 - 26.05.2012
i got this Error
Код:
error 017: undefined symbol "Team"
Re: Setteam Commands -
Devilxz97 - 26.05.2012
i try to make it like this .
Код:
CMD:setteam(playerid, params[])
{
new ID,gTeamID;
if(sscanf(params, "rd", ID,gTeamID))
return SendClientMessage(playerid, -1, "/setteam [playerid/PartOfName] [TeamID]");
if(!IsPlayerConnected(ID))
return SendClientMessage(playerid, -1, "Offline");
gTeam[ID] = gTeamID;//Example
return true;
}
and it got fix
but idk if this works in game :\