[AJUDA] Script sу funciona pra um player
#3

Quote:
Originally Posted by Shickcard
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/SetTimer
https://sampwiki.blast.hk/wiki/SetTimerEx

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
  new os;
  new pTimer[MAX_PLAYERS];
  new pWeapon[MAX_PLAYERS];  
  if (killerid == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_YELLOW,"Vocк morreu de causas naturais no jogo.");
 new Float:posX[MAX_PLAYERS], Float:posY[MAX_PLAYERS], Float:posZ[MAX_PLAYERS];
 GetPlayerPos(playerid,posX[playerid],posY[playerid],posZ[playerid]);
 SendClientMessage(playerid,COLOR_PURPLE,"Vocк morreu!!!");
 os = GetPlayerScore(killerid);
 SetPlayerScore(killerid,os++);
 SendClientMessage(killerid,COLOR_PURPLE,"Vocк matou!!!");
 pTimer[playerid] = SetTimer("RenasceNoMesmoLugar",4000,0);
 pWeapon[playerid] = GetPlayerWeapon(playerid);
 SetTimer("Renascer", 4000, 0);
 return 1;
}
pawn Код:
forward Renascer(playerid);
public Renascer(playerid)
{
 new Float:posX[MAX_PLAYERS], Float:posY[MAX_PLAYERS], Float:posZ[MAX_PLAYERS];
 SetPlayerInterior(playerid,0);
 GivePlayerWeapon(playerid,pWeapon[playerid],50);
 SetPlayerPos(playerid,posX[playerid],posY[playerid],posZ[playerid]);
 KillTimer(pTimer[playerid]);
 SendClientMessage(playerid,COLOR_YELLOW,"Vocк voltou ao local aonde morreu.");
 return 1;
}
Pode me dizer o que fez, para eu poder entender o que fiz de errado. Grato
Reply


Messages In This Thread
[AJUDA] Script sу funciona pra um player - by guivaldevieso - 19.05.2011, 00:09
Re: [AJUDA] Script sу funciona pra um player - by Macintosh - 19.05.2011, 00:16
Re: [AJUDA] Script sу funciona pra um player - by guivaldevieso - 19.05.2011, 00:19
Re: [AJUDA] Script sу funciona pra um player - by Macintosh - 19.05.2011, 00:21
Re: [AJUDA] Script sу funciona pra um player - by guivaldevieso - 19.05.2011, 00:23
Re: [AJUDA] Script sу funciona pra um player - by Macintosh - 19.05.2011, 00:26

Forum Jump:


Users browsing this thread: 2 Guest(s)