16.07.2017, 15:59
PHP код:
CMD:goto(playerid, params[])
{
new id;
if(IsPlayerConnected(id))
{
if ( GetPVarInt( playerid, "AdminLevel" ) < 1)
return SendClientMessage( playerid, -1, "You are not allowed to use this command!");
{
if(!sscanf(params, "ui", id))
{
new string[64];
new vehid = GetPlayerVehicleID(playerid);;
new name[MAX_PLAYER_NAME];
new Float:x, Float:y, Float:z;
new PlayerName[MAX_PLAYER_NAME];
GetPlayerPos(id,x,y,z);
GetVehiclePos(vehid,x,y,z);
SetPlayerInterior(playerid,GetPlayerInterior(id));
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(id, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), ""ORANGESV"%s {FFFFFF}teleported his self to you.", name);
SendClientMessage(id, -1, string);
format(string, sizeof(string), "You teleported yourself to "ORANGESV"%s.", PlayerName);
SendClientMessage(playerid, -1, string);
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
SetPlayerPos(playerid,x+2,y,z);
SetVehiclePos(vehid,x+2,y,z);
PutPlayerInVehicle(playerid, vehid, 0);
return 1;
}
else return SendClientMessage(playerid, -1, "Usage : /goto [id/name]");
}
}
else return SendClientMessage(playerid, -1, "Player is not connected.");
}
Quote:
C:\Users\cyber\Desktop\New Text Document.txt(3403) : error 036: empty statement C:\Users\cyber\Desktop\New Text Document.txt(3412) : error 001: expected token: "-string end-", but found "-identifier-" C:\Users\cyber\Desktop\New Text Document.txt(3412) : error 017: undefined symbol "ORANGESV" C:\Users\cyber\Desktop\New Text Document.txt(3412) : error 029: invalid expression, assumed zero C:\Users\cyber\Desktop\New Text Document.txt(3412) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase |