SetTimer(PLAYERID,"name",interval,0); This possible?? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: SetTimer(PLAYERID,"name",interval,0); This possible?? (
/showthread.php?tid=68559)
SetTimer(PLAYERID,"name",interval,0); This possible?? -
introzen - 11.03.2009
I got this command:
pawn Код:
public UnTaze(playerid)
{
TogglePlayerControllable(playerid,1);
SendClientMessage(playerid,COLOR_PURPLE,"Taze is over, you can move again");
ClearAnimations(playerid);
}
dcmd_taze(playerid,params[])
{
if(PlayerInfo[playerid][pMember] != 1) return 1;
new id;
if(sscanf(params,"u",id)) return SendClientMessage(playerid,COLOR_DARKRED,"Usage: /taze <playerid/partofname>");
if(GetDistanceBetweenPlayers(id,playerid) > 7) return SendClientMessage(playerid,COLOR_DARKRED,"Too far away");
if(PlayerInfo[id][pCuffed] != 0) return SendClientMessage(playerid,COLOR_DARKRED,"Player already in custody");
if(PlayerInfo[id][pMember] == 1) return SendClientMessage(playerid,COLOR_DARKRED,"Can't Taze a cop");
if(id == playerid) return SendClientMessage(playerid,COLOR_DARKRED,"Can't taze yourself");
TogglePlayerControllable(id,false);
SetTimer("UnTaze",1000*30,0);
new string[256],pName[MAX_PLAYER_NAME],idName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
GetPlayerName(id,idName,sizeof(idName));
GameTextForPlayer(id,"~r~Tazed!",3000,4);
ApplyAnimation(id,"CRACK","crckdeth2",4.1,1,1,1,1,0);
format(string,sizeof(string),"%s aims with his tazer on %s and shoots",pName,idName);
ProxDetector(25.0,playerid,string,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
How do i set this timer "UnTaze" for "id" and not for "playerid" ?? Please help =)
Re: SetTimer(PLAYERID,"name",interval,0); This possible?? -
Rks25 - 11.03.2009
Use SetTimerEx.
Re: SetTimer(PLAYERID,"name",interval,0); This possible?? -
MenaceX^ - 11.03.2009
Nah, you can do it only with SetTimerEx.
pawn Код:
SetTimerEx("untaze",1000*30,0,"d",playerid);
Re: SetTimer(PLAYERID,"name",interval,0); This possible?? -
Mikep - 11.03.2009
Meanace, its good if you post links to the wiki. (Just a friendly suggestion)
https://sampwiki.blast.hk/wiki/SetTimerEx