08.08.2009, 21:03
Quote:
|
// I must put something here to it will know he bougt the laptop ? |

Basically like this:
Код:
if(!strcmp(cmdtext,"/buy laptop", true))
{
if(PlayerToPoint(20, playerid, -27.5028,-51.9626,1003.5469))
{
if(GetPlayerMoney(playerid) >= 450) // Check if the player has enough money
{
if(HasLaptop[playerid] == 0) // Check if the player does NOT have a laptop
{
SendClientMessage(playerid,COLOR_GREEN,"You have bought a laptop for 450$");
GivePlayerMoney(playerid, -450);
HasLaptop[playerid] = 1; // Set the laptop variable to 1
}
else // Player already has a laptop
{
SendClientMessage(playerid,COLOR_GREEN,"You already have a laptop!");
}
}
else
{
SendClientMessage(playerid,COLOR_GREEN,"You need 450$ to buy a laptop!");
return 1;
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"You're not in a shop");
}
return 1;
}
Also, don't say sorry... we all start from somewhere.
Hope this helps.

