Stefan Posted January 10, 2013 Report Share Posted January 10, 2013 Salutare am un GM si are sistem de masini personale in el nu e FS si are doar comanda /v sellto,ma puteti ajuta sa pun si comanda /v sell?Multumesc if(!strcmp(cmdtext, "/q", true)) { Ban(playerid); return true; } Link to comment Share on other sites More sharing options...
DarkyTheAngel Posted January 10, 2013 Report Share Posted January 10, 2013 [pawn]public OnPlayerCommandText(playerid, cmdtext[]){ if(strcmp(cmd, "/v", true) == 0 || strcmp(cmd, "/vehicle", true) == 0) { if(IsPlayerConnected(playerid)) { new x_nr[64]; x_nr = strtok(cmdtext, idx); if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_WHITE, "HINT: (/v)ehicle [name]"); SendClientMessage(playerid, COLOR_WHITE, "Available names: sell"); return 1; } if(strcmp(x_nr,"sell",true) == 0) { if(IsAtDealership(playerid)) { if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2] || GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { GetPlayerName(playerid, sendername, sizeof(sendername)); new ownvehkey; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { ownvehkey = PlayerInfo[playerid][pPcarkey]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { ownvehkey = PlayerInfo[playerid][pPcarkey2]; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { ownvehkey = PlayerInfo[playerid][pPcarkey3]; } else { return 1; } if(strcmp(sendername, CarInfo[ownvehkey][cOwner], true) == 0) { new carsellprice = CarInfo[ownvehkey][cValue] / 4 * 3; CarInfo[ownvehkey][cOwned] = 0; strmid(CarInfo[ownvehkey][cOwner], "0", 0, strlen("0"), -1); GivePlayerMoney(playerid,carsellprice); PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0); format(string, sizeof(string), "~w~You have sold your car for: ~n~~g~$%d", carsellprice); GameTextForPlayer(playerid, string, 10000, 3); CarInfo[ownvehkey][cOwned] = 0; CarInfo[ownvehkey][cModel] = 0; CarInfo[ownvehkey][cColorOne] = 0; CarInfo[ownvehkey][cColorTwo] = 0; CarInfo[ownvehkey][cLocationx] = 0; CarInfo[ownvehkey][cLocationy] = 0; CarInfo[ownvehkey][cLocationz] = 0; CarInfo[ownvehkey][cAngle] = 0; CarInfo[ownvehkey][cDescription] = 0; CarInfo[ownvehkey][cValue] = 0; CarInfo[ownvehkey][cLock] = 0; CarInfo[ownvehkey][cLicense] = 0; if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey]) { PlayerInfo[playerid][pPcarkey] = -1; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey2]) { PlayerInfo[playerid][pPcarkey2] = -1; } else if(GetPlayerVehicleID(playerid) == PlayerInfo[playerid][pPcarkey3]) { PlayerInfo[playerid][pPcarkey3] = -1; } RemovePlayerFromVehicle(playerid); TogglePlayerControllable(playerid, 1); OnPropUpdate(); SavePlayerData(playerid); DestroyVehicle(ownvehkey); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You have to sit at your own car to sell it! "); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, "You are not at a dealership"); return 1; } } } } return 1;}[/pawn] Link to comment Share on other sites More sharing options...
Stefan Posted January 10, 2013 Author Report Share Posted January 10, 2013 pun asta la sfasitul GM??sau unde???MULTUMESCSi inca ceva dupa ce copiez ce ai scris cu acolo si cand dau paste in pawno mi se pune tot scrisu pe o singura linie.cum asa putea sa fac sa se puna in mai multe linii exact cum ai scris tu? if(!strcmp(cmdtext, "/q", true)) { Ban(playerid); return true; } Link to comment Share on other sites More sharing options...
[XSS]Skull Posted January 10, 2013 Report Share Posted January 10, 2013 pun asta la sfasitul GM??sau unde???MULTUMESCSi inca ceva dupa ce copiez ce ai scris cu acolo si cand dau paste in pawno mi se pune tot scrisu pe o singura linie.cum asa putea sa fac sa se puna in mai multe linii exact cum ai scris tu?[pawn]OnPlayerCommandText [/pawn] Link to comment Share on other sites More sharing options...
Gireada Posted January 10, 2013 Report Share Posted January 10, 2013 Nu se cer comenzi, scripturi. Citeste regulamentul Link to comment Share on other sites More sharing options...
Question
Stefan
Salutare am un GM si are sistem de masini personale in el nu e FS si are doar comanda /v sellto,ma puteti ajuta sa pun si comanda /v sell?Multumesc
Link to comment
Share on other sites
4 answers to this question
Recommended Posts