another help and sorry again - 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: another help and sorry again (
/showthread.php?tid=182966)
another help and sorry again -
[MKD]Max - 13.10.2010
hey guys i have maked spawn command it all done but when i go in game its not work so guys please can you help me here is the pastbin
http://pastebin.com/41zqDi4m
please help
Re: another help and sorry again -
Backwardsman97 - 13.10.2010
Try this.
pawn Код:
dcmd_spawn(playerid,params[])
{
if(Player[playerid][admin] < 2)
{
SendClientMessage(i,COLOR_ERROR,"You Dont Have Right To Use This Command");
return 1;
}
new pID = strval(params);//No need for sscanf if there's only one parameter
if(pID < 0 || pID > 500)
{
SendClientMessage(pID,COLOR_RED,"USAGE: /spawn [playerid]");
return 1;
}
if(!IsPlayerConnected(pID))
{
SendClientMessage(pID,COLOR_RED,"Nobody is connected with this ID!");
return 1;
}
if(Player[pID][admin] < Player[pID][admin])
{
SendClientMessage(playerid,COLOR_RED,"You can`t SPAWN a high ranked admin");
return 1;
}
new string[128];
format(string,128,"**(ADMIN SPAWN)** %s(%d)",name,pID);
SendClientMessageToAll(COLOR_RED,string);
format(string,128,"You Have Been SPAWNED By Admin");
SendClientMessage(playerid,COLOR_RED,string);
SpawnPlayer(pID);
return 1;
}
Re: another help and sorry again -
[MKD]Max - 13.10.2010
dcmd(spawn, ,cmdtext); what the number for spawn
Re: another help and sorry again -
Prumpuz - 13.10.2010
Quote:
Originally Posted by [MKD]Max
dcmd(spawn, ,cmdtext); what the number for spawn
|
dcmd(spawn,5,cmdtext);
the number is the number off letters in the command. See more:
https://sampwiki.blast.hk/wiki/Fast_Commands