06.04.2010, 12:43
I have this:
Which takes you to a DM zone and gives you weapons.
But as my server is race/stunt aswell I don't want guns out of DM zone.
Here is my exit script.
Can someone edit the /leavedm so that it takes away the weapons?
Much appreciated, thanks.
pawn Код:
if (strcmp("/dm1", cmdtext, true, 10) == 0)
{
if (jatekos[playerid] == 1)
{
SetPlayerPos(playerid, 1290.5618,-2034.6489,58.2215);
GivePlayerWeapon(playerid,31, 500);
GivePlayerWeapon(playerid,28, 500);
GivePlayerWeapon(playerid,4, 1);
gyilkos[playerid]=1;
jatekos[playerid]=0;
new name[256];
new string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "[INFO] %s connected to DM zone. [Exit: /leavedm]", name);
SendClientMessageToAll(COLOR_ORANGE, string);
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "[INFO] You are already in DM zone! (Use /leavedm)");
}
return 1;
}
But as my server is race/stunt aswell I don't want guns out of DM zone.
Here is my exit script.
pawn Код:
if (strcmp("/leavedm", cmdtext, true, 10) == 0)
{
if (jatekos[playerid] == 0)
{
SetPlayerPos(playerid, 833.5051,-1981.1245,191.9546);
gyilkos[playerid]=0;
jatekos[playerid]=1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "[INFO] You aren't in DM zone!");
}
return 1;
}
return 0;
}
Much appreciated, thanks.