Taking Away Weapons On Tele - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Taking Away Weapons On Tele (
/showthread.php?tid=139800)
Taking Away Weapons On Tele -
Jonny_lockhart - 06.04.2010
I have this:
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;
}
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.
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;
}
Can someone edit the /leavedm so that it takes away the weapons?
Much appreciated, thanks.
Re: Taking Away Weapons On Tele -
Geso - 06.04.2010
pawn Код:
if (strcmp("/leavedm", cmdtext, true, 10) == 0)
{
if (jatekos[playerid] == 0)
{
SetPlayerPos(playerid, 833.5051,-1981.1245,191.9546);
ResetPlayerWeapons(playerid);
gyilkos[playerid]=0;
jatekos[playerid]=1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "[INFO] You aren't in DM zone!");
}
return 1;
}
return 0;
}
Not that hard