21.01.2010, 14:10
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext,"/teleport",true)==0) { // /center is what the player enter into the text field
if(IsPlayerInVehicle(playerid,GetPlayerVehicleID(playerid))) { //Checks if player is inside a vehicle
SetVehiclePos(GetPlayerVehicleID(playerid),0.0,0.0,200.0); // Teleports the vehicle
SendClientMessage(playerid, 0xEE66EEFF, "Teleportation Successful");
} else {
SetPlayerPos(playerid,653.954895,-1223.468139,17.173387); // teleports the player
SendClientMessage(playerid, 0xEE66EEFF, "Teleportation Successful");
}
return 1;
}
if (strcmp(cmdtext,"/teleport",true)==0) { // /center is what the player enter into the text field
if(IsPlayerInVehicle(playerid,GetPlayerVehicleID(playerid))) { //Checks if player is inside a vehicle
SetVehiclePos(GetPlayerVehicleID(playerid),0.0,0.0,200.0); // Teleports the vehicle
SendClientMessage(playerid, 0xEE66EEFF, "Teleportation Successful");
} else {
SetPlayerPos(playerid,653.954895,-1223.468139,17.173387); // teleports the player
SendClientMessage(playerid, 0xEE66EEFF, "Teleportation Successful");
}
return 1;
}
return 0;
}