[HELP ME] 3 Errors.
#8

if(!strcmp(cmd,"/goto",true) || !strcmp(cmd,"/gotoid",true))
{
if(!(PlayerInfo[playerid][pAdmin] >= 2))
return SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
// process command
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE,"USAGE: /goto [playerid]");
return 1;
}
new
p=1,
Float:a = GetPlayerFacingAngle(playerid,a),
destination[64] = " ",
lookupid = ReturnUser(tmp);

if(GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) p=0;
if(lookupid != INVALID_PLAYER_ID)
{
if(lookupid != playerid)
{
if(!gPlayerLogged[lookupid])
return SendClientMessage(playerid, COLOR_GRAD2,"That player hasn't spawned yet.");
if(GetPlayerState(lookupid) == PLAYER_STATE_SPECTATING)
return SendClientMessage(playerid, COLOR_GRAD2,"That player is spectating someone.");
}
new
Float,
Float:y,
Float:z,
i = GetPlayerInterior(lookupid),
v = GetPlayerVirtualWorld(lookupid);
if(IsPlayerInAnyVehicle(lookupid))
{
GetVehicleZAngle(GetPlayerVehicleID(lookupid),a);
} else {
GetPlayerFacingAngle(lookupid,a);
}
GetPlayerPos(lookupid,x,y,z);
Teleport(playerid,x,y+2,z,a,i,v,p);
destination = PlayerName(lookupid);
}
// format string and send to player
format(string, sizeof(string),"Teleporting to %s",destination);
SendClientMessage(playerid, COLOR_GRAD2,string);
return 1;
}
Reply


Messages In This Thread
[HELP ME] 3 Errors. - by jo1101 - 14.04.2012, 03:14
Re: [HELP ME] 3 Errors. - by sniperwars - 14.04.2012, 03:44
Re: [HELP ME] 3 Errors. - by jo1101 - 14.04.2012, 14:01
Re: [HELP ME] 3 Errors. - by Ironboy - 14.04.2012, 14:27
Re: [HELP ME] 3 Errors. - by jo1101 - 16.04.2012, 02:44
Re: [HELP ME] 3 Errors. - by Cjgogo - 16.04.2012, 07:55
Re: [HELP ME] 3 Errors. - by Mark™ - 16.04.2012, 07:59
Re: [HELP ME] 3 Errors. - by ChristianPrice - 17.04.2012, 01:01
Re: [HELP ME] 3 Errors. - by sampmark05 - 17.04.2012, 01:41

Forum Jump:


Users browsing this thread: 1 Guest(s)