Jump to content
  • 0

Nu merge comanda.


Catalin # Valoare

Question

Salut,

 

Am incercat sa fac comanda /editmodel car.Nu imi da eroare/warning.Cand e sa dau pe server /editmdel car imi scrie ca masina a fost editata dar ea ramane lafel.Daca stiti sa faceti ajutati-ma cu ea pls.

Uitati aici:

if(strcmp(cmd, "/editmodelcar", true) == 0)

{
   if(PlayerData[playerid][pAdmin] < 8)
    {
    SendError(playerid,cmd);
      return 1;
}
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
  if(EsteManager(playerid))
  {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendUsage(playerid,"/editmodelcar [carid] [value]");
return 1;
}
new carid = strval(tmp);
       tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendUsage(playerid,"/editmodelcar [carid] [value]");
return 1;
}
new model = strval(tmp);
if(carid <= PreVehicle)
{
   format(string, sizeof(string), "Server: Masinile personala au id-ul de la %d +",PreVehicle);
SendClientMessage(playerid, COLOR_WHITE, string);
   return 1;
}
if(model < 400)
{
   SendClientMessage(playerid, COLOR_GRAD1,"Server: Modelul trebuie sa fie mai mare de 400");
return 1;
}
if(CarData[carid-PreVehicle][cModel] < 400 || CarData[carid-PreVehicle][cModel] > 611)
{
   SendClientMessage(playerid, COLOR_GRAD1,"Server: Aceasta masina nu este personala! Este creata cu /veh");
   return 1;
}
CarData[carid-PreVehicle][cModel] = model;
CreatedCar ++;
format(string, sizeof(string), " Tipe-ul masinii cu id %d este acum %d" , carid,model);
SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
format(string, sizeof(string), "UPDATE cars SET Model='%d' WHERE id=%d", CarData[carid-PreVehicle][cModel], carid-PreVehicle);
mysql_query(string);
return 1;
}
else
{
   SendClientMessage(playerid, COLOR_GRAD1,"Server: Error");
   return 1;
}
}
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • 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.