public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/buyskin", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, 207.4764,-100.9283,1005.2578)) //Checks If Player In The Place 5.0 is the redius!
{
if(GetPlayerMoney(playerid) < 5) return SendClientMessage(playerid, 0xFF0000FF, "You Dont Have Enough Money!"); //if player dont have enough money it doesnt buy and send that message
SetPlayerSkin(playerid, 0); // 0 is cj if u want other change the id number!
}
else
{
SendClientMessage(playerid, 0xFF0000FFm "You Are Not In The Point!");//if player no in the place (point) It says that player not in the point!
}
return 1;
}
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/buyskin", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, 207.4764,-100.9283,1005.2578)) //Checks If Player In The Place 5.0 is the redius!
{
if(GetPlayerMoney(playerid) < 5) return SendClientMessage(playerid, 0xFF0000FF, "You Dont Have Enough Money!"); //if player dont have enough money it doesnt buy and send that message
SetPlayerSkin(playerid, 0); // 0 is cj if u want other change the id number!
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "You Are Not In The Point!");//if player no in the place (point) It says that player not in the point!
}
return 1;
}
return 0;
}
stock SCP(_id, _param[], _command[] = "")
{
format(iStr, sizeof(iStr), "{6a696a}[Command]: /%s {9c9a9c}%s", _command, _param);
return SendMessageToPlayer(_id, COLOR_LIGHTGREY, iStr, 128);
}
COMMAND:buyskin(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, 207.4764,-100.9283,1005.2578)
if(GetPlayerMoney(playerid) < 500) return SendClientMessage(playerid, COLOR_GREY, "Not enough money!");
{
new iSkin;
if(sscanf(params, "d", iSkin)) return SCP(playerid, "[skin id]");
if(!IsValidSkin(iSkin)) return SCP(playerid, "[skin id]");
SetPlayerSkin(playerid, iSkin);
PlayerInfo[playerid][Skin] = iSkin;
return 1;
}
return 1;
}
Hare Try This :
pawn Код:
|
if(!IsPlayerInRangeOfPoint(playerid, Float:Radius, Float:X, Float:Y, Float:Z)) return SendClientMessage(playerid, 0xFFFFFFF, "You are not in range of the location.");