public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256]; if(strcmp(cmd, "/mycommand", true)) { if(IsPlayerInArea(playerid, -70.06725, 1646.58, 432.0814, 2125.373)) { GameTextForPlayer(playerid, "Entering Army Territory", 1, 1); } return 1; } return 0; } IsPlayerInArea(playerid, Float:data[4]) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, X, Y, Z); if(X >= data[0] && X <= data[2] && Y >= data[1] && Y <= data[3]) { return 1; } return 0; }
(81) : error 035: argument type mismatch (argument 2)
if(IsPlayerInArea(playerid, -70.06725, 1646.58, 432.0814, 2125.373))
IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if (x > minx && x < maxx && y > miny && y < maxy) return 1;
{
DM[playerid] = 1;
}
return 0;
}
Originally Posted by $ЂЯĢ
Change your IsPlayeRInArea function with this:
pawn Код:
|
98 = DM[playerid] = 1;
if (x > minx && x < maxx && y > miny && y < maxy) return 1;
IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if (x > minx && x < maxx && y > miny && y < maxy) return 1;
return 0;
}
Army = GangZoneCreate(-70.06725, 1646.58, 432.0814, 2125.373);
new cmd[256]; if(strcmp(cmd, "/mycommand", true)) { if(IsPlayerInArea(playerid, -70.06725, 1646.58, 432.0814, 2125.373)) { GameTextForPlayer(playerid, "Entering Army Territory", 1, 1); } return 1; }
IsPlayerInArea(playerid, {-70.06725, 1646.58, 432.0814, 2125.373})
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256];
if(strcmp(cmd, "/mycommand", true))
{
if(IsPlayerInArea(playerid, {-70.06725, 1646.58, 432.0814, 2125.373}))
{
GameTextForPlayer(playerid, "Entering Army Territory", 1, 1);
}
return 1;
}
return 0;
}
IsPlayerInArea(playerid, Float:data[4])
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
if(X >= data[0] && X <= data[2] && Y >= data[1] && Y <= data[3]) {
return 1;
}
return 0;
}
IsPlayerInArea(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if (x > minx && x < maxx && y > miny && y < maxy) return 1;
return 0;
}
new cmd[256]; // You don't need it
if(strcmp(cmdtext, "/mycommand", true) == 0) // Few changes here
{
if(IsPlayerInArea(playerid, -70.06725, 1646.58, 432.0814, 2125.373))
{
GameTextForPlayer(playerid, "Entering Army Territory", 1, 1);
}
return 1;
}
Originally Posted by MadeMan
Use this function:
pawn Код:
pawn Код:
|
Originally Posted by Ritchie999
will it show automatically? i'll go test it now
|