How can I do it ?
#1

How can I do that when player is going to a checkpoint his vehicle he's using is dessaper ? [Gone I meant]



Whats the code I should add to this ?

Код:
CMD:getdeliver(playerid, params[])
{
 if (PlayerInfo[playerid][pJob] != 0 && PlayerInfo[playerid][pJob2] != 0)
 {
  SendClientMessageEx(playerid,COLOR_GREY,"   You are not working in other job already [For work for that /quitjob]");
  return 1;
 }
    new vehicleid = GetPlayerVehicleID(playerid);
    if(!(IsADeliverCar(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER))
 {
     SendClientMessageEx(playerid,COLOR_GREY,"   You need to be driving a Deliver in Deliver Truck!");
     return 1;
 }
 if(!(GetPlayerSkin(playerid) == 29))
 {
     SendClientMessageEx(playerid,COLOR_GREY,"   You need to be in the Deliver Man uniform!");
     return 1;
 }
 new playername[MAX_PLAYER_NAME];
 GetPlayerName(playerid, playername, sizeof(playername));
 if (!IsPlayerInRangeOfPoint(playerid, 3.0, -1713.961425, 1348.545166, 7.180452))
 {
  SendClientMessageEx(playerid,COLOR_GREY,"   You are not at the Delivering pickup!");
  return 1;
 }
 if(GetPVarInt(playerid, "Delivering") > 0)
 {
  SendClientMessageEx(playerid, COLOR_GREY, "   You are already delivering the illeagel stuff!");
  return 1;
 }
 new szMessage[128];
 format(szMessage, sizeof(szMessage), "You have picked up the Deliver for SPAS-12 Weapon! ");
 SendClientMessageEx(playerid, COLOR_WHITE, szMessage);
 GivePlayerWeapon( playerid, 27, 99999 );

 
 return 1;
}
One more question I've created this command how can I do where the checkpoint he should get there and than he get the spas , I created this command but IDK how to do it , ? And instead the code of checkpoint write for me : "write here" I'll fill the right coorditions I want...
Reply
#2

Well, if you wanted the vehicle to respawn, use SetVehicleToRespawn: https://sampwiki.blast.hk/wiki/SetVehicleToRespawn

If you want to actually get rid of the vehicle, use DestroyVehicle: https://sampwiki.blast.hk/wiki/DestroyVehicle

To give a player a weapon, use GivePlayerWeapon: https://sampwiki.blast.hk/wiki/GivePlayerWeapon
Reply
#3

Quote:
Originally Posted by MattyG
Посмотреть сообщение
Well, if you wanted the vehicle to respawn, use SetVehicleToRespawn: https://sampwiki.blast.hk/wiki/SetVehicleToRespawn

If you want to actually get rid of the vehicle, use DestroyVehicle: https://sampwiki.blast.hk/wiki/DestroyVehicle

To give a player a weapon, use GivePlayerWeapon: https://sampwiki.blast.hk/wiki/GivePlayerWeapon
Yet you're forgetting the most important part of this entire thing..

https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint
Reply
#4

Yeah thank u so much guys but really I meant to that if u can to tell me where should I enter the codes of EnterCheckPoint in that cmd ? Please ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)