CMD:minigun1(playerid, params[]) { SetPlayerPos(playerid,1367.6130,1540.9064,121.1731); GivePlayerWeapon(playerid, 38, 22222); GameTextForPlayer(playerid,"Welcome to Minigun Round, /Kill to quit don't fire outside cage :D",4000,6); return 1; }
new VariableDeBloqueo[MAX_PLAYERS];//we create that
if(VariableDeBloqueo[playerid] == 1) return SendClientMessage(playerid, -1, "Sorry, you are in DM Zone, you have to put /Kill for get out. ");//put this in the top of onplayercommandtext
CMD:minigun1(playerid, params[])
{
SetPlayerPos(playerid,1367.6130,1540.9064,121.1731);
GivePlayerWeapon(playerid, 38, 22222);
VariableDeBloqueo[playerid] = 1;//the variable is ON
GameTextForPlayer(playerid,"Welcome to Minigun Round, /Kill to quit don't fire outside cage :D",4000,6);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
VariableDeBloqueo[playerid] = 0;//the variable is off
return 1;
}
Look, i had created a custom map and set my event round there... When anyone type /minigun1 he will TP to that area and will get minigun with unlimited ammo. But he can also goto other Teleport by using other teleports like after joining /minigun1 he can do /gotols then he will not lose his minigun Please tell me what to write so nobody can leave the /minigun1 without typing /kill... Please help ..
Код:
CMD:minigun1(playerid, params[]) { SetPlayerPos(playerid,1367.6130,1540.9064,121.1731); GivePlayerWeapon(playerid, 38, 22222); GameTextForPlayer(playerid,"Welcome to Minigun Round, /Kill to quit don't fire outside cage :D",4000,6); return 1; } |
CMD:minigun1(playerid, params[]) {
SetPlayerPos(playerid,1367.6130,1540.9064,121.1731);
[B]ResetPlayerWeapons(playerid);[/B]
GivePlayerWeapon(playerid, 38, 22222);
GameTextForPlayer(playerid,"Welcome to Minigun Round, /Kill to quit don't fire outside cage :D",4000,6);
return 1;
}
new bool: IsPlayerInMinigun[MAX_PLAYERS] = false;
CMD:minigun(playerid, params[])
{
new Zone;
if(sscanf(params, "i", Zone)) return SendClientMessage(playerid, -1, "Usage: /minigun <1> ");
if(IsPlayerInMinigun[playerid]) return SendClientMessage(playerid, -1, "You are currently in a DM zone. /kill to leave.");
else
{
if(strcmp(params, "1", true)) // Add more like this.
{
ResetPlayerWeapons(playerid); // Reset the players weapons before anything else
IsPlayerInMinigun[playerid] = true; // Don't use 1 or 0 with this using bools saves memory.
SetPlayerPos(playerid,1367.6130,1540.9064,121.1731);
GivePlayerWeapon(playerid, 38, 0xFFF); // Truly Unlimited Ammo.
GameTextForPlayer(playerid,"Welcome to Minigun Round, /Kill to quit don't fire outside cage :D",4000,6);
}
}
return 1;
}