30.05.2010, 18:06
ok i got it but it just calls random cars and not the ones i want to be able to call the ones with the names like
vehicle2 = addstaticvehicle etc
heres the code
vehicle2 = addstaticvehicle etc
heres the code
Код:
dcmd_callcar(playerid, params[]) { new vehicleid = GetPlayerVehicleID(playerid); new s[128]; new Float:X, Float:Y, Float:Z; if(sscanf(params, "s", vehicleid)) SendClientMessage(playerid, TEXT_COLOR, "USAGE: \"/callcar [carname]\""); else if(GetPlayerState(playerid) == 2) SendClientMessage(playerid, TEXT_COLOR, "You must be on foot to call your car."); else { new string[70]; format(string, sizeof(string), "You have called car id: %s", s); GetPlayerPos(playerid, X, Y, Z); new Float:pX, Float:pY; GetXYInFrontOfPlayer(playerid, pX, pY, 3.0); SetVehiclePos(vehicleid, pX, pY, Z); //Vehicle ID being the actual vehicle ID number, not just 'vehicleid' SendClientMessage(playerid, 0x00FFFFAA, string); return 1; } return 1; }