Alecsandro Posted February 20, 2012 Report Share Posted February 20, 2012 Salut stiu ca nu e o problema dar am nevoie de ajutor si nush cum sa fac.Am sistemul la masini personale cu /v lock , park , buy etcSi vreau sa fie fare prefixul /v" vreau sa fac /lockcar /parkcar cu aceleasi coduri de comanda.Exemplu /v buy sa-l fac /buyvehicle if(strcmp(cmd, "/v", true) == 0 || strcmp(cmd, "/vehicle", true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SCM(playerid, COLOR_GREY, " You need to login first ! "); return 1; } new x_nr[64]; x_nr = strtok(cmdtext, idx); if(!strlen(x_nr)) { SCM(playerid, COLOR_WHITE, "HINT: (/v)ehicle [name]"); SCM(playerid, COLOR_WHITE, "Available names: park, lock1,lock2 sell, sellto, color, tow1, tow2 locate1,locate2, plate"); return 1; } else if(strcmp(x_nr,"buy",true) == 0) { if(IsAnOwnableCar(idcar)) { if(PlayerInfo[playerid][pLevel] < 4) { SendClientMessage(playerid, COLOR_GREY, "You need to be level 4 to buy a vehicle!"); return 1; } if(PlayerInfo[playerid][pPcarkey] == 999) { } else if(PlayerInfo[playerid][pPcarkey2] == 999) { } else { SendClientMessage(playerid, COLOR_WHITE, "You owned already two cars"); return 1; } if(CarInfo[idcar][cOwned]==1) { SendClientMessage(playerid, COLOR_WHITE, "Someone owned already this car"); return 1; } if(GetPlayerMoney(playerid) >= CarInfo[idcar][cValue]) { if(PlayerInfo[playerid][pPcarkey] == 999) { PlayerInfo[playerid][pPcarkey] = idcar; } else if(PlayerInfo[playerid][pPcarkey2] == 999) { PlayerInfo[playerid][pPcarkey2] = idcar; } else { return 1; } CarInfo[idcar][cComponent0] = 0; CarInfo[idcar][cComponent1] = 0; CarInfo[idcar][cComponent2] = 0; CarInfo[idcar][cComponent3] = 0; CarInfo[idcar][cComponent4] = 0; CarInfo[idcar][cComponent5] = 0; CarInfo[idcar][cComponent6] = 0; CarInfo[idcar][cComponent7] = 0; CarInfo[idcar][cComponent8] = 0; CarInfo[idcar][cComponent9] = 0; CarInfo[idcar][cComponent10] = 0; CarInfo[idcar][cComponent11] = 0; CarInfo[idcar][cComponent12] = 0; CarInfo[idcar][cComponent13] = 0; CarInfo[idcar][cOwned] = 1; GetPlayerName(playerid, sendername, sizeof(sendername)); strmid(CarInfo[idcar][cOwner], sendername, 0, strlen(sendername), 999); GivePlayerMoney(playerid,-CarInfo[idcar][cValue]); PlayerPlayMusic(playerid); GameTextForPlayer(playerid, "~w~Congratulations~n~Don't forget to /v park it!", 5000, 3); SCM(playerid, COLOR_GRAD2, "Congratulations on your new purchase!"); SCM(playerid, COLOR_GRAD2, "Type /vehiclehelp to view the vehicle manual!"); SendClientMessage(playerid, COLOR_YELLOW2, "You can start the engine up now !"); gEngine[playerid] = 0; engineOn[GetPlayerVehicleID(playerid)] = false; OnPropUpdate(); OnPlayerUpdate(playerid); TogglePlayerControllable(playerid, 1); return 1; } else { SCM(playerid, COLOR_GREY, " You don't have enough cash with you ! "); return 1; } } } Link to comment Share on other sites More sharing options...
TzAkS Posted February 20, 2012 Report Share Posted February 20, 2012 Si ce e asa de greu?Pune [pawn]if(strcmp(cmd, "/buy", true) == 0[/pawn]In loc de [pawn]else if(strcmp(x_nr,"buy",true) == 0)[/pawn] Link to comment Share on other sites More sharing options...
Alecsandro Posted February 20, 2012 Author Report Share Posted February 20, 2012 am facut asa si am primit eroare asta!C:\Downloads\0.3d\gamemodes\Teddy23.pwn(34925) : error 029: invalid expression, assumed zero Link to comment Share on other sites More sharing options...
TzAkS Posted February 21, 2012 Report Share Posted February 21, 2012 Linia? Link to comment Share on other sites More sharing options...
heker Posted February 21, 2012 Report Share Posted February 21, 2012 ia citeste si tu regulamentul :) Link to comment Share on other sites More sharing options...
Question
Alecsandro
Salut stiu ca nu e o problema dar am nevoie de ajutor si nush cum sa fac.
Am sistemul la masini personale cu /v lock , park , buy etc
Si vreau sa fie fare prefixul /v" vreau sa fac /lockcar /parkcar cu aceleasi coduri de comanda.
Exemplu /v buy sa-l fac /buyvehicle
Link to comment
Share on other sites
4 answers to this question
Recommended Posts