[HELP]No-Kill
#1

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 ?
Reply
#2

More information please lol. Like I am not understanding you.
Reply
#3

https://sampwiki.blast.hk/wiki/ResetPlayerWeapons
Reply
#4

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

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.
Reply
#6

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

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;
}
Reply
#8

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 ?
Reply
#9

At the bottom of your script
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)