command doesn't exist
#1

I did add this to my gamemode
When I type /flip it says the command doesn't exist
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

  if(strcmp(cmdtext, "/flip", true) == 0)
  {
  if(IsPlayerInAnyVehicle(playerid))
  {
    new currentveh;
    new Float:angle;
    currentveh = GetPlayerVehicleID(playerid);
    GetVehicleZAngle(currentveh, angle);
    SetVehicleZAngle(currentveh, angle);
    SendClientMessage(playerid, 0xFFFFFFFF, "AdrenalineBot: Your vehicle has been flipped.");
    return 1;
  }
  else
  {
    SendClientMessage(playerid, 0xFFFFFFFF, "AdrenalineBot: You are not in any vehicle!");
    return 1;
  }
  }
   return 0;
}
Reply
#2

Quote:
Originally Posted by [P]Awno
Посмотреть сообщение
Is ths Compile one ? (amx&pwn) ? If no , then this no work
I said I did put it in the gamemode
Reply
#3

So long why ?!
pawn Код:
if(strcmp(cmdtext,"/flip",true)==0)
    {
      if(PlayerInfo[playerid][power]>5)
         {
     new Float:X,Float:Y,Float:Z,Float:Angle;
     if (IsPlayerInAnyVehicle(playerid)){ GetPlayerPos(playerid,X,Y,Z); GetPlayerFacingAngle(playerid,Angle); SetVehiclePos(GetPlayerVehicleID(playerid),X,Y,Z + 1); SetVehicleZAngle(GetPlayerVehicleID(playerid),Angle); SendClientMessage(playerid,COLOR_YELLOW,"You have successfully flipped your vehicle.");
          }
      else SendClientMessage(playerid,COLOR_RED,"You must be in a vehicle.");
      }
     return 1;
     }
Works 100 %
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)