28.04.2011, 20:40
Can i make if an player does /minigun, they teleport to minigun but they cannot use any commands expect /leavedm
new IsPlayerInDMzone[MAX_PLAYERS];
COMMAND:minigun(pplayerid, params[])
{
IsPlayerInDMzone[playerid] = 1;
//stuff stuff
}
COMMAND:leavedm(playerid, params[])
{
IsPlayerInDMzone[playerid] = 0;
//stuff stuff
}
COMMAND:anothercommand(playerid, params[])
{
if(IsPlayerInDMzone[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFAA, "You cannt teleport to another place when your in a DM zone use /leavedm first!");
//stuff stuff
}
if(IsPlayerInDMzone[playerid] == 1) return 0;
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(IsPlayerInDMzone[playerid] == 1) return SendClientMesage(playerid, COLOR, "Get out from /minigun first.");
return 1;
}
public OnPlayerCommandReceived(playerid, cmdtext[])
{
if(IsPlayerInDMzone[playerid] == 1)
{
SendClientMessage(playerid,COLOR_RED,"You're In Dm Zone You Can't Use Any Command");
return 0;
}
return 1;
}