Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new InDerby[MAX_PLAYERS]; // at the top
- new Float:derbyspawns[][] = // at the top
- {
- {/*x, y, z, facingAnlge*/},
- {/*x, y, z, facingAnlge*/},
- {/*x, y, z, facingAnlge*/},
- {/*x, y, z, facingAnlge*/},
- {/*x, y, z, facingAnlge*/}
- };
- CMD:derby(playerid,params[])
- {
- if(InDerby[playerid] == 1) return SendClientMessage(playerid,color,"You are already in derby. Type /leave to exit derby dm");
- new rand = random(sizeof(derbyspawns));
- new veh = CreateVehicle(451,derbyspawns[rand][0],derbyspawns[rand][1],derbyspawns[rand][2],derbyspawns[rand][3],-1,-1,-1);
- PutPlayerInVehicle(playerid,veh,0);
- InDerby[playerid] = 1;
- return 1;
- }
- CMD:leave(playerid,params[])
- {
- if(InDerby[playerid] == 0) return SendClientMessage(playerid,color,"You are not in derby!");
- InDerby[playerid] = 0;
- SetPlayerHealth(playerid,0);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment