gta6287

Derby

Jul 3rd, 2012
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.85 KB | None | 0 0
  1. new InDerby[MAX_PLAYERS]; // at the top
  2.  
  3. new Float:derbyspawns[][] = // at the top
  4. {
  5.     {/*x, y, z, facingAnlge*/},
  6.     {/*x, y, z, facingAnlge*/},
  7.     {/*x, y, z, facingAnlge*/},
  8.     {/*x, y, z, facingAnlge*/},
  9.     {/*x, y, z, facingAnlge*/}
  10. };
  11.  
  12. CMD:derby(playerid,params[])
  13. {
  14.     if(InDerby[playerid] == 1) return SendClientMessage(playerid,color,"You are already in derby. Type /leave to exit derby dm");
  15.     new rand = random(sizeof(derbyspawns));
  16.     new veh = CreateVehicle(451,derbyspawns[rand][0],derbyspawns[rand][1],derbyspawns[rand][2],derbyspawns[rand][3],-1,-1,-1);
  17.     PutPlayerInVehicle(playerid,veh,0);
  18.     InDerby[playerid] = 1;
  19.     return 1;
  20. }
  21.  
  22. CMD:leave(playerid,params[])
  23. {
  24.     if(InDerby[playerid] == 0) return SendClientMessage(playerid,color,"You are not in derby!");
  25.     InDerby[playerid] = 0;
  26.     SetPlayerHealth(playerid,0);
  27.     return 1;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment