Set Timer Help
#1

Код:
#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.
Reply
#2

https://sampwiki.blast.hk/wiki/SetTimer
https://sampwiki.blast.hk/wiki/SetTimerEx
https://sampwiki.blast.hk/wiki/KillTimer
Reply
#3

idk please u do it i am a nub plz
Reply
#4

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.
Reply
#5

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

Im actually trying to help you learn how to do something.
Reply
#7

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
Reply
#8

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.
Reply
#9

I Tried xD
Reply
#10

No replies
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)