SA-MP Forums Archive
[HELP]No-Kill - 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)
+--- Thread: [HELP]No-Kill (/showthread.php?tid=280074)



[HELP]No-Kill - Riso135 - 30.08.2011

Please help me ! How can i make something like that if player enters some are (cube) his weapons will disappear but when he leaves area his weapons will be loaded again (something like no-kill zone). So how pls ?


Re: [HELP]No-Kill - bestr32 - 30.08.2011

More information please lol. Like I am not understanding you.


Re: [HELP]No-Kill - Davz*|*Criss - 30.08.2011

https://sampwiki.blast.hk/wiki/ResetPlayerWeapons


Re: [HELP]No-Kill - Michael@Belgium - 30.08.2011

When he enter the area you have to use ResetPlayerWeapons(playerid) and when he leave just use GivePlayerWeapon(playerid,weaponid,ammo)


Re: [HELP]No-Kill - [HiC]TheKiller - 30.08.2011

pawn Код:
new weapons[MAX_PLAYERS][13][2];
//When the player enters a zone
for (new i = 0; i < 13; i++) GetPlayerWeaponData(playerid, i, weapons[playerid][i][0], weapons[playerid][i][1]);
ResetPlayerWeapons(playerid);

//When the player exits the zone
for (new i = 0; i < 13; i++) if(weapons[playerid][i][0] != 0) GivePlayerWeapon(playerid, weapons[playerid][i][0], weapons[playerid][i][1]);
Give that a go.


Re: [HELP]No-Kill - Riso135 - 30.08.2011

But i want to know how to make that area too (no IsPlayerInSphere) but something like IsPlayerInCube


Re: [HELP]No-Kill - Pinguinn - 30.08.2011

pawn Код:
IsPlayerInCube(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy, Float:minz, Float:maxz)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    if (x > minx && x < maxx && y > miny && y < maxy && z > minz && z < maxz) return 1;
    return 0;
}



Re: [HELP]No-Kill - Riso135 - 30.08.2011

Quote:
Originally Posted by Pinguinn
Посмотреть сообщение
pawn Код:
IsPlayerInCube(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy, Float:minz, Float:maxz)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    if (x > minx && x < maxx && y > miny && y < maxy && z > minz && z < maxz) return 1;
    return 0;
}
where sould i put this ?


Re: [HELP]No-Kill - Pinguinn - 30.08.2011

At the bottom of your script