Advertisement
Guest User

Untitled

a guest
Apr 8th, 2020
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.45 KB | None | 0 0
  1. new faccion[MAX_PLAYERS]; // variable de faccion.
  2.  
  3. public OnPlayerSpawn(playerid)
  4. {
  5.     faccion[playerid] = 2; // al spawnear se le asigna la facción 2
  6.     return 1;
  7. }
  8.  
  9. public OnPlayerStateChange(playerid, newstate, oldstate)
  10. {
  11.     if (newstate == PLAYER_STATE_DRIVER /* si entra a un vehículo como conductor */ && faccion != 1 /* y no es de la facción 1 */)
  12.     {
  13.         RemovePlayerFromVehicle(playerid); // se expulsará del vehículo.
  14.     }
  15.     return 1;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement