Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward setInitDefault(pl);
- new
- bool:gPlayerStart [ MAX_PLAYERS ] ,
- gPlayerWeapon [ MAX_PLAYERS ] ;
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if (killerid != INVALID_PLAYER_ID)
- {
- if (gPlayerWeapon [ killerid ] == 9)
- {
- setWinner(killerid);
- return 1;
- }
- gPlayerWeapon [ killerid ] ++ ;
- setWeaponUpgrade(killerid, gPlayerWeapon [ killerid ])
- }
- }
- new bool:gPm [ MAX_PLAYERS ] ;
- public OnPlayerDeath(playerid, killerid, reason)
- {
- gPm [ playerid ] = 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if (gPm [ playerid ])
- {
- SetPlayerPos(playerid, x, y, z); //x, y, z = posição do hospital
- gPm [ playerid ] = 0;
- }
- }
- public OnPlayerConnect(playerid)
- {
- gPlayerStart [ playerid ] = true;
- SetTimerEx("setInitDefault", 5000, 0, "i", playerid);
- }
- stock setWinner(pl)
- {
- //Mensagem de vitória, parabenização, dinheiro, essas coisas.
- }
- public setInitDefault(pl)
- {
- SpawnPlayer(pl);
- SetPlayerPos(pl, x, y, z); //Mudar x, y, z pelas coordenadas desejadas
- setWeaponUpgrade(pl, 0);
- }
- stock setWeaponUpgrade(pl, wp)
- {
- switch(wp)
- {
- case 1: GivePlayerWeapon(pl, 22, 9999);
- case 2: GivePlayerWeapon(pl, 25, 9999);
- case 3: GivePlayerWeapon(pl, 28, 9999);
- case 4: GivePlayerWeapon(pl, 29, 9999);
- case 5: GivePlayerWeapon(pl, 32, 9999);
- case 6: GivePlayerWeapon(pl, 30, 9999);
- case 7: GivePlayerWeapon(pl, 31, 9999);
- case 8: GivePlayerWeapon(pl, 34, 9999);
- case 9: GivePlayerWeapon(pl, 35, 9999);
- default: GivePlayerWeapon(pl, 4, 1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment