Quote from: yazeen on March 13, 2011, 04:02:00 PMmeh not works error
Use
SetTimer(GOTO,5000,)
too lazy to make all
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: yazeen on March 13, 2011, 04:02:00 PMmeh not works error
Use
SetTimer(GOTO,5000,)
too lazy to make all
[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]