SHARE
TWEET

Untitled

a guest Jun 25th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <a_samp>
  2. #include <zcmd>
  3.  
  4. #define GIAOBAO 1
  5.  
  6. new GiaoBao[256];
  7.  
  8. public OnGameModeInit()
  9. {
  10.     AddStaticVehicle(510,1270.0687,-1540.7834,13.1740,269.4365,3,3); // 1
  11.     AddStaticVehicle(510,1270.3615,-1544.5277,13.1733,269.3868,3,3); // 2
  12.     AddStaticVehicle(510,1269.7872,-1547.4979,13.1756,267.4109,3,3); // 3
  13.     Create3DTextLabel("Dung lenh /giaobao de lay bao", 0xFFFF00AA, 1275.6151,-1533.6395,13.5547, 10.0,0);
  14.     CreatePickup(1239, 2, 1275.6151,-1533.6395,13.5547, -1);
  15. }
  16. CMD:giaobao(playerid, params[])
  17. {
  18.     if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 251) return SendClientMessage(playerid, 0xFFFF00AA, "Ban khong o tren xe giao bao");
  19.     if(!IsPlayerInRangeOfPoint(playerid, 10, 1275.6151,-1533.6395,13.5547)) return SendClientMessage(playerid, 0xFFFF00AA, "Ban da lay bao , hay chay toi dia diem tren ban do");
  20.     GiaoBao[playerid] = 1;
  21.     SetPlayerCheckpoint(playerid, 1298.3256,-1555.4885,13.3828, 10);
  22.     SendClientMessage(playerid, 0xFFFF00AA, "Hay den dia diem giao bao");
  23.     return 1;
  24. }
  25.  
  26. public OnPlayerEnterCheckpoint(playerid)
  27. {
  28.     if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 510)
  29.     {
  30.         if(GiaoBao[playerid] == 1)
  31.         {
  32.             GiaoBao[playerid] = 0;
  33.             SendClientMessage(playerid, 0xFFFF00AA, "Ban da giao bao thanh cong va nhan duoc 10.000$");
  34.             CallRemoteFunction("GivePlayerCash", "ii", playerid,10000);
  35.             //GivePlayerMoney(playerid, 10000);
  36.             DisablePlayerCheckpoint(playerid);
  37.             return 1;
  38.         }  
  39.     }
  40.     return 1;
  41. }
  42. public OnPlayerExitVehicle(playerid, vehicleid)
  43. {
  44.     if(GiaoBao[playerid] > 0)
  45.     {
  46.         GiaoBao[playerid] = 0;
  47.         DisablePlayerCheckpoint(playerid);
  48.         SendClientMessage(playerid, 0xFFFF00AA, "Ban da roi khoi xe nen diem giao bao da mat dong thoi se mat xe");
  49.         DestroyVehicle(510);
  50.     }
  51. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top