25.08.2012, 19:08
pawn Код:
command(teleport, playerid, params[])
{
if(Player[playerid][AdminLevel] >= 1)
{
if(isnull(params))
{
SendClientMessage(playerid, WHITE, "USAGE: /teleport <location>");
SendClientMessage(playerid, WHITE, "Sections: LS | SF");
}
if(!strcmp(params, "ls", true)) // Los Santos
{
if (GetPlayerState(playerid) == 2)
{
SetVehiclePos(GetPlayerVehicleID(playerid), 1529.6,-1691.2,13.3);
}
else
{
SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
}
SendClientMessage(playerid, RED, "You have been teleported.");
SetPlayerInterior(playerid,0);
/*PlayerInfo[playerid][pLocal] = 0;*/
SetPlayerVirtualWorld(playerid, 0);
}
if(!strcmp(params, "sf", true)) // San Fierro
{
if (GetPlayerState(playerid) == 2)
{
SetVehiclePos(GetPlayerVehicleID(playerid), 1529.6,-1691.2,13.3);
}
else
{
SetPlayerPos(playerid, 1529.6,-1691.2,13.3);
}
SendClientMessage(playerid, RED, "You have been teleported.");
SetPlayerInterior(playerid,0);
/*PlayerInfo[playerid][pLocal] = 0;*/
SetPlayerVirtualWorld(playerid, 0);
}
return true;
}
}
Quote:
C:\Users\owner\Desktop\SCRP\Server Files\gamemodes\SCRP.pwn(17555) : warning 217: loose indentation C:\Users\owner\Desktop\SCRP\Server Files\gamemodes\SCRP.pwn(17570) : warning 217: loose indentation C:\Users\owner\Desktop\SCRP\Server Files\gamemodes\SCRP.pwn(17577) : warning 209: function "cmd_teleport" should return a value |