Safezone Help !! -
Devilxz97 - 31.05.2012
hey guys i need help with some script .
im making an Safezone . when player kill someone in RedZone or Safezone the Killerid get automatically kick .
this is the Safezone code
// top of the script
new Safezone;
public OnGameModeInit()
{
Safezone = GangZoneCreate(-2529.877, -684.1067, -2502.838, -593.3725);
public OnPlayerSpawn(playerid)
{
GangZoneShowForPlayer(playerid, Safezone, 0xFF0000AA);
help pls
Respuesta: Safezone Help !! -
Chris1337 - 31.05.2012
get automatically?
Re: Safezone Help !! -
mati233 - 31.05.2012
get automaticly what?..
Re: Safezone Help !! -
Devilxz97 - 31.05.2012
lolz miss some text xDD
Get Automatically kick
Re: Safezone Help !! -
pasha97 - 31.05.2012
Reall. A part of text is missing lol
Re: Safezone Help !! -
Devilxz97 - 31.05.2012
lolz
Re: Safezone Help !! -
pasha97 - 31.05.2012
Try:
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerInRangeOfPoint(killerid, 85.0, -2510.0, -640.0, 11.0))
{
SendClientMessage(killerid,0xFFFFFFFF,"You are not allowed to kill players in this zone!!");
kick(killerid);
}
}
Respuesta: Safezone Help !! -
Chris1337 - 31.05.2012
I would do
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(isplayeringangzone[playerid] = Safezone) //You must have a stock (wich i dont have i just made it
{
Kick(killerid);
}
}
return 1;
Re: Respuesta: Safezone Help !! -
Devilxz97 - 31.05.2012
Quote:
Originally Posted by axxelac
I would do
pawn Код:
public OnPlayerDeath(playerid, killerid, reason) { if(isplayeringangzone[playerid] = Safezone) //You must have a stock (wich i dont have i just made it { Kick(killerid); } } return 1;
|
hmm i dont have the stock , and its difficult for me cause im still new in scripting
Respuesta: Safezone Help !! -
Chris1337 - 31.05.2012
pawn Код:
#define MAX_ZONES 100
enum gzinfo
{
Float:gmaxX,
Float:gmaxY,
Float:gminY,
Float:gminX,
};
new Zone[MAX_ZONES][gzinfo];
new LastZone = 0;
GangZoneCreate2(Float:minx, Float:miny, Float:maxx, Float:maxy)
{
GangZoneCreate(minx,miny,maxx,maxy);
Zone[LastZone][gminX]=minx;
Zone[LastZone][gminY]=miny;
Zone[LastZone][gmaxX]=maxx;
Zone[LastZone][gmaxY]=maxy;
LastZone++;
return 1;
}
IsPlayerInGangZone(playerid,gangzoneid)
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
if( Pos[0] >= Zone[gangzoneid][gminX] && Pos[0] <= Zone[gangzoneid][gmaxX] && Pos[1] >= Zone[gangzoneid][gminY] && Pos[1] <= Zone[gangzoneid][gmaxY] ) return 1;
else return 0;
}
GetPlayerZone(playerid)
{
for( new g=0; g<MAX_ZONES; g++)
{
if( IsPlayerInGangZone(playerid, g) )
{
return Zone[g][gzinfo]; /*error*/
}
}
return g;
}
Re: Safezone Help !! -
Devilxz97 - 31.05.2012
thats all ? let me try
Re: Safezone Help !! -
Devilxz97 - 31.05.2012
Код:
C:\Users\user\Desktop\SAMP server 0.3e\gamemodes\DriftVision.pwn(2255) : warning 203: symbol is never used: "GangZoneCreate2"
C:\Users\user\Desktop\SAMP server 0.3e\gamemodes\DriftVision.pwn(2255) : warning 203: symbol is never used: "GetPlayerZone"
C:\Users\user\Desktop\SAMP server 0.3e\gamemodes\DriftVision.pwn(2255) : warning 203: symbol is never used: "IsPlayerInGangZone"
i got this
Re: Safezone Help !! -
Devilxz97 - 31.05.2012
its not works
. . :\ anyone else ?? help me
Re: Safezone Help !! -
JaKe Elite - 31.05.2012
you never used GetPlayerZone, GangZoneCreate2 and IsPlayerInGangZone
The compiler just remind you to use them
EDIT: use IsPlayerInArea it has minx/y/maxx/y
MinX/Y/Maxx/Y is use in GangZones
Re: Safezone Help !! -
Devilxz97 - 31.05.2012
im using Xtreme Vehicle Plotter to make the Zone
Re: Safezone Help !! -
MadeMan - 31.05.2012
Quote:
Originally Posted by pasha97
Try:
PHP код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(IsPlayerInRangeOfPoint(killerid, 85.0, -2510.0, -640.0, 11.0))
{
SendClientMessage(killerid,0xFFFFFFFF,"You are not allowed to kill players in this zone!!");
kick(killerid);
}
}
|
This should work, but 'kick' should be 'Kick'
Re: Safezone Help !! -
TitoRayne - 12.10.2017
Well done, the last one has just worked on my gamemod without kick.
maybe its usefull if it has message