Whats wrong with this code? help :S
#3

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


Messages In This Thread
Whats wrong with this code? help :S - by Lipsmoker101 - 21.01.2010, 13:34
Re: Whats wrong with this code? help :S - by Kwarde - 21.01.2010, 14:05
Re: Whats wrong with this code? help :S - by fsnameless - 21.01.2010, 14:10
Re: Whats wrong with this code? help :S - by Kwarde - 21.01.2010, 15:00
Re: Whats wrong with this code? help :S - by Lipsmoker101 - 21.01.2010, 17:37
Re: Whats wrong with this code? help :S - by Joe Staff - 21.01.2010, 17:47
Re: Whats wrong with this code? help :S - by Lipsmoker101 - 21.01.2010, 18:09

Forum Jump:


Users browsing this thread: 2 Guest(s)