Author Topic: help me guys  (Read 2224 times)

0 Members and 1 Guest are viewing this topic.

Offline Scripter

  • Wiseguy
  • **
  • Posts: 62
    • View Profile
help me guys
« on: March 13, 2011, 11:39:27 am »
!Buycar cmd bug

Code: [Select]
[code] else if (strcmp(cmd, "!buycar", true) == 0) {
    tmp = strtok(cmdtext, idx);
if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "You need to login first!");
else if(!strlen(tmp)) SendClientMessage(playerid,COLOR_GREEN, "USAGE: !buycar [VehicleID]");
else if(!IsVehicleForSale(tmp)) SendClientMessage(playerid,COLOR_GREEN, "Error: That vehicle is not for sale!");
else if(strcmp(GetPlayerLocation(playerid), "Sunshine-Autos-Viceport-Vice-City-Mainland", true) == 1) SendClientMessage(playerid,COLOR_GREEN, "Error: You have to be at the Sunshine Autos!");
else {
    new cost = GetVehicleCost(tmp);
    if(GetPlayerHandCash(gPlayers[playerid]) < cost) {
SendClientMessage(playerid,COLOR_GREEN, "Error: Not enought money!");
    return 1;
}
format(file, sizeof(file), "/Vehicles/owners.ini", "owners");
dini_Set(file, tmp, gPlayers[playerid]);
DecPlayerHandCash(playerid,cost);
format(szMsg,sizeof(szMsg),"Vehicle bought! Costed:[ $%d ]",cost);
SendClientMessage(playerid,COLOR_GREEN,szMsg);
}
return 1;
}
[/code]

when i do !buycar it just sold direct to player why it doesn't shows that u need to be at sunshine autos
can anyone help me who knows pawno

yazeen

  • Guest
Re: help me guys
« Reply #1 on: March 13, 2011, 01:44:49 pm »
Its bugged

Offline BIG[H]

  • Made Man
  • ***
  • Posts: 159
  • Sight of light
    • View Profile
Re: help me guys
« Reply #2 on: March 13, 2011, 02:22:58 pm »
Just use Shadows.heekz PlayerToPoint(20,xyz,playerid);
Outdoor city server Administrator, FS server owner!