Again a help from getall cmd
#1

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;
	}
Reply
#2

an } is missing before return 1;
Reply
#3

Damn,that was close!Grrrrr,i feel like suiciding now...such a small mistake!
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)