Whats wrong with this code? help :S
#2

Something like this?:

pawn Код:
#include <a_samp>

#define COLOR 0xEE66EEFF

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext,"/teleport",true))
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
      SetVehiclePos(GetPlayerVehicleID(playerid),0.0,0.0,200.0);
      SendClientMessage(playerid, COLOR, "Teleportation Successful");
    }
        else
        {
      SetPlayerPos(playerid,653.954895,-1223.468139,17.173387); // teleports the player
      SendClientMessage(playerid, COLOR, "Teleportation Successful");
        }
    }
    if(!strcmp(cmdtext, "/drift1",true))
    {
      if(IsPlayerInAnyVehicle(playerid))
      {
        SetVehiclePos(GetPlayerVehicleID(playerid),0,0,200); //EDIT IT!
        SendClientMessage(playerid, COLOR, "Teleportation succesful");
        }
        else
        {
          SetPlayerPos(playerid,0,0,200); //EDIT IT!
          SendClientMessage(playerid, COLOR, "Teleportation succesful");
        }
    }
    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: 1 Guest(s)