12.11.2013, 20:19
Hello i Want to make a command in an interior. E.g /buygun in the gunstore interior
if(strcmp("/buygun", cmd, true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, 0.0, 0.0, 0.0))//You must decide what X, Y, Z they must be at.
{
if(GetPlayerMoney(playerid) >= 500)
{
GivePlayerWeapon(playerid, 24, 57);// Full clip + 50 bullets.
GivePlayerMoney(playerid, -500); // 500$ Will be deducted.
}
else
{
SendClientMessage(playerid, -1, #You do not have $500);
}
}
else
{
SendClientMessage(playerid, -1, #You are not at the gun store);
}
return 1;
}
pawn Код:
|
if(GetPlayerInterior(playerid) == 1)
{
Code Here!
}
else
{
code here!
}
Just use
pawn Код:
instead of checking the position |