13.11.2010, 13:16
CMD:
DCMD:
ZCMD:
pawn Код:
OnPlayerCommandText(playerid,cmdtext)
{
if(strcmp(cmd,"/armour",true) == 0)
{
if(GetPlayerMoney(playerid) < 1500) // you need 1500 dolars to buy it or else you cant buy
{
SendClientMessage(playerid,COLOR_RED,"** Sorry, you do not have enough cash. You need $1500!");
}
else
{
SetPlayerArmour(playerid,100);
GivePlayerMoney(playerid, -1500); // It Takes 1500 dolars
}
if(!IsPlayerInRangeOfPoint(playerid, 10, 316.524994,-167.706985,999.661987) || IsPlayerInRangeOfPoint(playerid, 3,316.524994,-167.706985,999.661987))
{
SendClientMessage(playerid,COLOR_RED,"** Sorry, you are not in a store.");
}
return 1;
}
}
}
pawn Код:
OnPlayerCommandText(playerid,cmdtext)
{
dcmd(armour ,6 ,cmdtext);
return 1;
}
dcmd_armour(playerid, params[])
{
if(GetPlayerMoney(playerid) < 1500) // you need 1500 dolars to buy it or else you cant buy
{
SendClientMessage(playerid,COLOR_RED,"** Sorry, you do not have enough cash. You need $1500!");
}
else
{
SetPlayerArmour(playerid,100);
GivePlayerMoney(playerid, -1500); // It Takes 1500 dolars
}
if(!IsPlayerInRangeOfPoint(playerid, 10, 316.524994,-167.706985,999.661987) || IsPlayerInRangeOfPoint(playerid, 3,316.524994,-167.706985,999.661987))
{
SendClientMessage(playerid,COLOR_RED,"** Sorry, you are not in a store.");
}
return 1;
}
}
pawn Код:
CMD:armour(playerid, params[])
{
if(GetPlayerMoney(playerid) < 1500) // you need 1500 dolars to buy it or else you cant buy
{
SendClientMessage(playerid,COLOR_RED,"** Sorry, you do not have enough cash. You need $1500!");
}
else
{
SetPlayerArmour(playerid,100);
GivePlayerMoney(playerid, -1500); // It Takes 1500 dolars
}
if(!IsPlayerInRangeOfPoint(playerid, 10, 316.524994,-167.706985,999.661987) || IsPlayerInRangeOfPoint(playerid, 3,316.524994,-167.706985,999.661987))
{
SendClientMessage(playerid,COLOR_RED,"** Sorry, you are not in a store.");
}
return 1;
}
}