SA-MP Forums Archive
Set Timer Help - 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: Set Timer Help (/showthread.php?tid=235217)



Set Timer Help - wheelman_WM - 05.03.2011

Код:
#include <a_samp>

#define COLOR_GREEN 0x33AA33AA

new mtimer;

public OnPlayerCommandText(playerid,cmdtext[]){
//============================/Minigun Madness========================================
    if(strcmp(cmdtext,"/minigun",true)==0)
	{
	SetCameraBehindPlayer(playerid);
	//DynUpdateStart(playerid); // Avoid falling through object's
	SetPlayerArmour(playerid,100);
	ResetPlayerWeapons(playerid);
	new vehicleid = GetPlayerVehicleID(playerid);
	new State = GetPlayerState(playerid);
	if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
	{
	GameTextForPlayer(playerid,"~g~R~r~P~g~G",4000,6);
	LinkVehicleToInterior(vehicleid,0);
	SetPlayerInterior(playerid,10);
	return SetVehiclePos(vehicleid,-975.57,1061.13,1345.67);
	}
	SetPlayerPos(playerid,-975.57,1061.13,1345.67);
	
	GivePlayerWeapon(playerid, 38, 999999999); // Minigun
    SetPlayerHealth(playerid, 100);
	SetPlayerInterior(playerid,10);
	mtimer = SetTimer("StartMinigun", 30000, 0);
    SendClientMessage(playerid,0x00FF00FF,"");
	SendClientMessage(playerid,0x00FF00FF,"You Have Joined The Minigun Madness Deathmatch");
    new name[MAX_PLAYER_NAME];
    new msg[256];
	GetPlayerName(playerid,name,MAX_PLAYER_NAME);
	format(msg,sizeof(msg),"%s [%i] has been teleported to Minigun Madness To Join Use [/minigun].",name,playerid);
	SendClientMessageToAll(COLOR_GREEN,msg);
return 1;
	}
	return 0;
}

public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid, playerid, reason);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
SendClientMessage(killerid, COLOR_GREEN, "You Hav Got 500 $ + 150 Rocket Laucher Ammo ");
GivePlayerWeapon(killerid, 35, 150);
KillTimer(mtimer);
SetPlayerPos(killerid,2779.6001,-2010.7078,13.5547);
GivePlayerMoney(killerid,500);
GivePlayerMoney(playerid,-500);
SendClientMessage(playerid, COLOR_GREEN, "You Have Been Droped Out From Minigun Madness (Reason : Died)");
SendClientMessage(killerid, COLOR_GREEN,"");
return 1;
}
I want to set its timer that when player come in the dm they will get weapon after 30 seconds and after 30 seconds no one can join it till it ends.


Re: Set Timer Help - HyperZ - 05.03.2011

https://sampwiki.blast.hk/wiki/SetTimer
https://sampwiki.blast.hk/wiki/SetTimerEx
https://sampwiki.blast.hk/wiki/KillTimer


Re: Set Timer Help - wheelman_WM - 05.03.2011

idk please u do it i am a nub plz


Re: Set Timer Help - Steven82 - 05.03.2011

Im sorry that we can't help you, since helping you would be like me helping a 12 year old kid eat by spoon feeding him. Figure it out, it aint that hard, actually read the wiki links and you might learn something.


Re: Set Timer Help - wheelman_WM - 05.03.2011

Thats Your wish u dont wanna help than dont But plz dnt insult me here
I am waiting for others :P


Re: Set Timer Help - Steven82 - 05.03.2011

Im actually trying to help you learn how to do something.


Re: Set Timer Help - wheelman_WM - 05.03.2011

I already said i am a nub i dont know :P
If u really wanna help me so please write the code
If U HELP = Your welcome


Re: Set Timer Help - [WF]Demon - 05.03.2011

Seriously Just click the links..... Instead of coming here for help, Experiment with those until You get so frustrated that you post here, Not post here right away.


Re: Set Timer Help - wheelman_WM - 05.03.2011

I Tried xD


Re: Set Timer Help - wheelman_WM - 05.03.2011

No replies