16.03.2011, 14:35
Can you remake this? to faster way? this takes ages on the way i did =/
and how to you add a count down ?
Could you make 1 with countdown and 1 without?
20
..
3
2
1
Tadda You have robbed the casino
and how to you add a count down ?
Could you make 1 with countdown and 1 without?
20
..
3
2
1
Tadda You have robbed the casino
pawn Код:
new RobbedDragonCasinoRecently[MAX_PLAYERS];
new DragonCasinoRob;
new DragonCasinoTimer[MAX_PLAYERS];
forward RobbedDragonCasinoRecent();
public OnGameModeInit()
{
//DragonCasinoRob = CP
return 1;
}
public OnPlayerConnect(playerid)
{
RobbedDragonCasinoRecently[playerid] = 0;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
RobbedDragonCasinoRecently[playerid] = 0;
return 1;
}
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == DragonCasinoRob)
{
//SendClientMEssage..
return 1;
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(robcas, 6, cmdtext);
return 0;
}
dcmd_robcas(playerid, params[])
{
#pragma unused params
if(RobbedDragonCasinoRecently[playerid] == 1) return SendClientMessage(playerid, COLOR_ERROR, "Please wait before robbing the 4 dragons casino again");
else if(!IsPlayerInRangeOfPoint(playerid, 3.0, X, Y, Z)) return SendClientMessage(playerid, COLOR_ERROR, "You are not in any 4 dragons casino checkpoint");
{
RobbedDragonCasinoRecently[playerid] = 1;
//Tadaa! You have robbed the casino
DragonCasinoTimer[playerid] = SetTimerEx("RobbedDragonCasinoRecent", 60000, false, "d", playerid);
return 1;
}
}
public RobbedDragonCasinoRecent()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(RobbedDragonCasinoRecently[i] == 1)
{
RobbedDragonCasinoRecently[i] = 0;
}
}
}