!Buycar cmd bug
[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