PutPlayerInVechile not working , help +rep.
#1

pawn Код:
CMD:getinveh(playerid,params[])
{
      new id;
      if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1,"Usage: /getinveh  [ID]");
      if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1,"Error:You must be in car to use this command!");
      if(IsPlayerInAnyVehicle(id)) return SendClientMessage(playerid, -1,"Error:This player is in car, You can't use this command!");
      PutPlayerInVehicle(id, GetPlayerVehicleID(playerid), 1);
    }
    return 1;
}
Reply
#2

Because u getting player vehicle I'd u didn't create vehicle
Reply
#3

I want to when some one write this command, it tp-ed him to the player's vechile pessanger num : 1.
Can you help me pls?
Reply
#4

PutPlayerInVehicle(playerid, GetPlayerVehicleID(I'd), 1); // change to this
Reply
#5

Alright, thanks +rep
Reply
#6

Quote:
Originally Posted by ZToPMaN
Посмотреть сообщение
pawn Код:
CMD:getinveh(playerid,params[])
{
      new id;
      if(sscanf(params, "d", id)) return SendClientMessage(playerid, -1,"Usage: /getinveh  [ID]");
      if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1,"Error:You must be in car to use this command!");
      if(IsPlayerInAnyVehicle(id)) return SendClientMessage(playerid, -1,"Error:This player is in car, You can't use this command!");
      PutPlayerInVehicle(id, GetPlayerVehicleID(playerid), 1);
    }
    return 1;
}
The sscanf should be 'u'.
PHP код:
if(sscanf(params"u"id)) return SendClientMessage(playerid, -1,"Usage: /getinveh  [ID]"); 
atleast the 'u' parameter is more useful.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)