27.12.2012, 03:17
Okay, I just found this /v command but for some reason, it doesn't work. It returns me with "A vehicle has been spawned near you!" but no cars are spawned near me.. if anyone could help, it'd meean alot.
Quote:
CMD:v(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] <= 1) return SendClientMessage(playerid, -1, "You are not authorized to use this command."); else { new vehid;new b1;new b2;new targetid[MAX_PLAYER_NAME]; if(sscanf(params, "uiii", targetid,vehid,b1,b2)) SendClientMessage(playerid, -1, "Use: /v [id] [car id] [color 1] [color 2]"); else if(vehid < 400 || vehid > 611) return SendClientMessage(playerid, -1, "Wrong car id! ( 400-600)"); else if(vehid == 425 || vehid == 520 || vehid == 537 || vehid == 538 || vehid == 569 || vehid == 570 || vehid == 590) return SendClientMessage(playerid, -1, "You can't spawn a hydra and the rest military vehicles!"); else if(b2 <=0 || b2 >= 252) return SendClientMessage(playerid, -1, "Wrong color 1 id!"); else if(b1 <=0 || b1 >= 252) return SendClientMessage(playerid, -1, "Wrong color 2 id!"); else { GetPlayerName(playerid, targetid, MAX_PLAYER_NAME); new Float, Float:y, Float:z;new Float:kut; GetPlayerPos(MAX_PLAYER_NAME, x, y, z); GetPlayerFacingAngle(playerid, kut); CreateVehicle(vehid, x + 3, y + 1, z, kut, b1, b2, -1); SendClientMessage(playerid, -1, "You have spawned a car near you!"); } } return 1; } |