Again a help from getall cmd - 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: Again a help from getall cmd (
/showthread.php?tid=502694)
Again a help from getall cmd -
Sojo12 - 25.03.2014
I know i've been asking a lot of questions but today when i was checking my countdown command i dont know what exactly i removed from this cmd i got 26 errors and when i get this its obvious that i've missed something in the code and im unable to figure.So i need a little help from the members:I think this is the last thing i'm asking please help me.
Код:
dcmd_getall(playerid, params[])
{
new string[256];
new pName[24];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(i,x+1,y,z);
SetPlayerVirtualWorld(i,GetPlayerVirtualWorld(playerid));
SetPlayerInterior(i,GetPlayerInterior(playerid));
format(string,sizeof(string),"{FF0099}[ADMIN]{FFFFFF}Everyone have been teleported!",pName);
SendClientMessageToAll(COLOR_ADMIN,string);
format(string,sizeof(string),"{FF0099}[ADMIN]{FFFFFF}Everyone have teleported to your location",pName);
SendClientMessage(playerid,COLOR_ADMIN,string);
return 1;
}
Re: Again a help from getall cmd -
Battlezone - 25.03.2014
an } is missing before return 1;
Re: Again a help from getall cmd -
Sojo12 - 25.03.2014
Damn,that was close!Grrrrr,i feel like suiciding now...such a small mistake!
Re: Again a help from getall cmd -
Hanuman - 25.03.2014
pawn Код:
dcmd_getall(playerid, params[])
{
new string[256];
new pName[24];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(i,x+1,y,z);
SetPlayerVirtualWorld(i,GetPlayerVirtualWorld(playerid));
SetPlayerInterior(i,GetPlayerInterior(playerid));
}
format(string,sizeof(string),"{FF0099}[ADMIN]{FFFFFF}Everyone have been teleported!",pName);
SendClientMessageToAll(COLOR_ADMIN,string);
format(string,sizeof(string),"{FF0099}[ADMIN]{FFFFFF}Everyone have teleported to your location",pName);
SendClientMessage(playerid,COLOR_ADMIN,string);
return 1;
}
Replace ur cmd with this.