Jump to content

crouch010

Membru
  • Posts

    5
  • Joined

  • Last visited

    Never

crouch010's Achievements

Rookie

Rookie (2/14)

  • First Post
  • Conversation Starter
  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

0

Reputation

  1. Incearca asta: if(strcmp(cmd, "/acreatecar", true) == 0) { if(PlayerInfo[playerid][pAdmin] == 1339) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /acreatecar [carid] [culoare1] [culoare2]"); return 1; } new car; car = strval(tmp); if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_WHITE, " Vehicle Number can't be below 400 or above 611 !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /acreatecar [carid] [culoare1] [culoare2]"); return 1; } new color1; color1 = strval(tmp); if(color1 < 0 || color1 > 252) { SendClientMessage(playerid, COLOR_WHITE, " Color Number can't be below 0 or above 252 !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /acreatecar [carid] [culoare1] [culoare2]"); return 1; } new color2; color2 = strval(tmp); if(color2 < 0 || color2 > 252) { SendClientMessage(playerid, COLOR_WHITE, " Color Number can't be below 0 or above 252 !"); return 1; } new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); new thiscar = CreateVehicle(car,X,Y,Z,1,color1,color2,99999999); CarInfo[thiscar][cOwned] = 0; CarInfo[thiscar][cModel] = car; CarInfo[thiscar][cColorOne] = color1; CarInfo[thiscar][cColorTwo] = color2; CarInfo[thiscar][cLocationx] = X; CarInfo[thiscar][cLocationy] = Y; CarInfo[thiscar][cLocationz] = Z; CarInfo[thiscar][cAngle] = 1; CarInfo[thiscar][cLock] = 0; PutPlayerInVehicle(playerid,thiscar,0); strmid(CarInfo[vehid][cOwner], "No-one", 0, strlen("No-one"), 999); format(CarInfo[thiscar][cDescription], 32, "%s",vehName[GetVehicleModel(GetPlayerVehicleID(playerid))-400]); format(string, sizeof(string), "{0000FF}The car {FF8000}%s [%d] {0000FF}has been created",CarInfo[thiscar][cDescription],thiscar); SendClientMessage(playerid, COLOR_BLUE, string); ShowPlayerDialog(playerid,DIALOGIDSETOWNER,DIALOG_STYLE_INPUT,"{E0941B}Vehicle owner","Write playerid/PartOfName \nto make owner this car:","Enter","Close"); } else SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!"); return 1; }
  2. if(strcmp(cmd, "/v", true) == 0 || strcmp(cmd, "/vehicle", true) == 0) if(IsPlayerConnected(playerid)) if(PlayerInfo[playerid][pPcarkey] != 0) { new x_nr[ 256 ] ; x_nr = strtok(cmdtext, idx) ; if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_WHITE, "|______________________Vehicle System__________________|"); SendClientMessage(playerid, COLOR_WHITE, "| USAGE: /v(ehicle) [name]"); SendClientMessage(playerid, COLOR_GREY, " | Available names: Fix(1-2)"); SendClientMessage(playerid, COLOR_WHITE, "|______________________________________________________|"); return 1; } if(strcmp(x_nr,"fix1",true) == 0) { if(GetPlayerMoney(playerid) > 1000) { if(!IsPlayerInAnyVehicle(playerid)) { if(SBizzInfo[8][sbProducts] == 0) { GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1); return 1; } SendClientMessage(playerid, COLOR_GRAD1,"{00C8FF}» {2641FE}PersonalCar 1 was respawned !"); SetVehicleToRespawn(PlayerInfo[playerid][pPcarkey]); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); SBizzInfo[8][sbTill] += 1000;//towcar buisness ExtortionSBiz(8, 1000); SBizzInfo[8][sbProducts]--; GivePlayerMoney(playerid, -1000); } else GameTextForPlayer(playerid, "~w~Car is~n~in ~r~use", 5000, 1); } else GameTextForPlayer(playerid, "~r~Not Enough Cash", 5000, 1); } } else if(strcmp(x_nr,"fix2",true) == 0) tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { if(GetPlayerMoney(playerid) > 1000) { if(!IsPlayerInAnyVehicle(playerid)) { if(SBizzInfo[8][sbProducts] == 0) { GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1); return 1; } SendClientMessage(playerid, COLOR_GRAD1,"{00C8FF}» {2641FE}PersonalCar 2 was respawned !"); SetVehicleToRespawn(PlayerInfo[playerid][pPcarkey2]); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); SBizzInfo[8][sbTill] += 1000;//towcar buisness ExtortionSBiz(8, 1000); SBizzInfo[8][sbProducts]--; GivePlayerMoney(playerid, -1000); } else GameTextForPlayer(playerid, "~w~Car is~n~in ~r~use", 5000, 1); } else GameTextForPlayer(playerid, "~r~Not Enough Cash", 5000, 1); } ERROR: else if(strcmp(x_nr,"fix2",true) == 0) pe linia asta e eroare....( ce are?
  3. Am adaugat asa,este la inceputul comandei....am facut o copie EXACT dupa alta comanda asemanatoare la park 1-2 doar ca aici da eraorea aia..... numai cand pun ELSE IF pentru fix2 atunci da eroare
  4. Salut,deci la comanda /v cand pun doar FIX1 functioneaza si comanda tot,fara erori ,problema vine cand adaug si FIX2 cu "else id" imi da eroare: EROARE: error 017: undefined symbol "x_nr" Comanda: if(strcmp(cmd, "/v",true) == 0 || strcmp(cmd, "/vehicle", true) == 0) if(IsPlayerConnected(playerid)) if(PlayerInfo[playerid][pPcarkey] != 0) { new x_nr[64]; x_nr = strtok(cmdtext, idx); if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_WHITE, "|______________________Vehicle System__________________|"); SendClientMessage(playerid, COLOR_WHITE, "| USAGE: /v(ehicle) [name]"); SendClientMessage(playerid, COLOR_GREY, " | Available names: Fix(1-2)"); SendClientMessage(playerid, COLOR_WHITE, "|______________________________________________________|"); return 1; } //GetPlayerName(playerid, sendername, sizeof(sendername)); //GetPlayerName(giveplayerid, playername, sizeof(playername)); if(strcmp(x_nr,"fix1",true) == 0) { if(GetPlayerMoney(playerid) > 1000) { if(!IsPlayerInAnyVehicle(playerid)) { if(SBizzInfo[8][sbProducts] == 0) { GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1); return 1; } SendClientMessage(playerid, COLOR_GRAD1,"{00C8FF}» {2641FE}PersonalCar 1 was respawned !"); SetVehicleToRespawn(PlayerInfo[playerid][pPcarkey]); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); SBizzInfo[8][sbTill] += 1000;//towcar buisness ExtortionSBiz(8, 1000); SBizzInfo[8][sbProducts]--; GivePlayerMoney(playerid, -1000); } else GameTextForPlayer(playerid, "~w~Car is~n~in ~r~use", 5000, 1); } else GameTextForPlayer(playerid, "~r~Not Enough Cash", 5000, 1); return 1; } } else if(strcmp(x_nr,"fix2",true) == 0) tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { if(GetPlayerMoney(playerid) > 1000) { if(!IsPlayerInAnyVehicle(playerid)) { if(SBizzInfo[8][sbProducts] == 0) { GameTextForPlayer(playerid, "~r~Out Of Stock", 5000, 1); return 1; } SendClientMessage(playerid, COLOR_GRAD1,"{00C8FF}» {2641FE}PersonalCar 2 was respawned !"); SetVehicleToRespawn(PlayerInfo[playerid][pPcarkey2]); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); SBizzInfo[8][sbTill] += 1000;//towcar buisness ExtortionSBiz(8, 1000); SBizzInfo[8][sbProducts]--; GivePlayerMoney(playerid, -1000); } else GameTextForPlayer(playerid, "~w~Car is~n~in ~r~use", 5000, 1); } else GameTextForPlayer(playerid, "~r~Not Enough Cash", 5000, 1); return 1; }
  5. Salut.Am o problema,am adaugat aceasta mapa la LS insa cum fac sa se vada de la orice distanta fiecare obiect?La mine cu cat ma apropii cu atat se vad obiectele si se vede foarte urat. LINK: http://www.sa-mp.ro/forum/index.php?PHPSESSID=8abe5b80f556e00138e56e98067ec3a1&topic=22448.0 POZA: http://imageshack.us/photo/my-images/138/samp000qf.png/
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.