25.12.2013, 14:10
Well, I was making a command called /loadiron so at my survival server you can load in iron that came from warehouses to your Backpack, I used IsPlayerInRangeOfPoint, but it ain't functioning right, since when I aint at the position i used at IsPlayerInRangeOfPoint even tho i use /loadiron it still loads while i used else
but here the code when i use other cmds it says You are not at the warehouse, while i didnt script like "when i use /stats it shows under stats You are not at the Warehouse
but here the code when i use other cmds it says You are not at the warehouse, while i didnt script like "when i use /stats it shows under stats You are not at the Warehouse
pawn Код:
if (strcmp("/loadiron", cmdtext,true,10) == 0)
{
IsPlayerInRangeOfPoint(playerid,2.0,-2454.5771,2254.1755,4.9802);
PlayerInfo[playerid][pIron]++;
PlayerInfo[playerid][pIron]++;
PlayerInfo[playerid][pIron]++;
PlayerInfo[playerid][pIron]++;
PlayerInfo[playerid][pIron]++;
SendClientMessage(playerid,COLOR_PURPLE,"You Have Loaded In 5 Pieces of Iron!");
}
else
{
!IsPlayerInRangeOfPoint(playerid,2.0,-2454.5771,2254.1755,4.9802);
SendClientMessage(playerid,COLOR_RED,"You are not at the warehouse!");
return 1;
}