08.03.2015, 07:41
Код:
CMD:car(playerid,params[]) { new string[128],cID,cID2,vID; new Float:x,Float:y,Float:z; if(PInfo[playerid][Level] < 1) return SendClientMessage(playerid,STEALTH_BLUE,"You need to be level 2 to use this command."); if(sscanf(params,"dzz",vID,cID,cID2)) return SendClientMessage(playerid,COLOR_INDIANRED,"USAGE /car [NAME] Optional: [COLOR1] [COLOR2]"); if(vCar[playerid] != -1) { DestroyVehicle(vCar[playerid]); } CMDMessageToAdmins(playerid,"CAR"); GetPlayerPos(playerid,x,y,z); vCar[playerid] = CreateVehicle(vID,x+2,y,z,0,cID,cID2,0); PutPlayerInVehicle(playerid,vCar[playerid], 0); LinkVehicleToInterior(vCar[playerid], GetPlayerInterior(playerid)); format(string,sizeof(string),"You have spawned vehicle %d with color %d and %d.",vID,cID,cID2); SendClientMessage(playerid,COLOR_GREENYELLOW,string); return 1; }