Freddie Posted May 21, 2011 Report Share Posted May 21, 2011 Nu am comanda /veh si /skin, si nici nu o gasesc, am gasit un topic pe forum in care era si comanda, doar ca de la comanda aia aveam 15 erori... Unde le pot gasi ? :| PS : Nu am GM de pe net, fac GM-ul de la 0 si probabil ca nu-mi mergea cpmanda aia ca nu am lucrurile definite... Link to comment Share on other sites More sharing options...
scr3ws0f7 Posted May 21, 2011 Report Share Posted May 21, 2011 nu stiu ce e /veh "veh" adica comenzi pentru masina? (gen.: deschide capota,inchide,alarma,lumini,motor on/off)si skin:sus de tot :[pawn]new newskins[]={265,266,267,269,270,271,272};[/pawn]la public OnPlayerCommandText[pawn] if (strcmp(cmd, "/skin", true) == 0 ) { new skin[256]; skin = strtok(cmdtext, idx); if (!strlen(skin)) { SendClientMessage(playerid, COLOR_RED, "Tasteaza: /skin [id skin]"); return 1; } new newskin = strval(skin); if ((newskin < 0) || (newskin > 299) || IsInvalidSkin(newskin)) { SendClientMessage(playerid, COLOR_RED, "Server: Acest skin nu exista!"); return 1; } if (GetPlayerMoney(playerid) >= 0) { SetPlayerSkin(playerid, newskin); GivePlayerMoney(playerid,-0); format(string, 128, "Server: Skinul a fost schimbat in %d ", newskin); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } else { SendClientMessage(playerid, COLOR_RED, "Nu poti schimba skin-ul o_ 0"); } return 1; }[/pawn]si jos de tot[pawn]IsInvalidSkin(skinid){ #define MAX_BAD_SKINS 22 new InSkin[MAX_BAD_SKINS] = { 0, 3, 4, 5, 6, 8, 42, 65, 74, 86, 119, 149, 208, 273, 289}; for (new i = 0; i < MAX_BAD_SKINS; i++) { if (skinid == InSkin) return true;} return 0;}[/pawn] <a href=http://devilone.ro></a> Link to comment Share on other sites More sharing options...
Freddie Posted May 21, 2011 Author Report Share Posted May 21, 2011 /veh adica comanda care spawneaza masini Link to comment Share on other sites More sharing options...
BlueSkiLLz Posted May 21, 2011 Report Share Posted May 21, 2011 [pawn]new CreatedCars[100];new CreatedCar = 0;[/pawn]OnPlayerCommandText[pawn]if(strcmp(cmd, "/veh", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]"); return 1; } new car; car = strval(tmp); if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, " Vehicle Number can't be below 400 or above 611!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]"); return 1; } new color1; color1 = strval(tmp); if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COLOR_GREY, " Color Number can't be below 0 or above 126!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]"); return 1; } new color2; color2 = strval(tmp); if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, COLOR_GREY, " Color Number can't be below 0 or above 126!"); return 1; } new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 60000); CreatedCars[CreatedCar] = carid; CreatedCar ++; format(string, sizeof(string), " Vehicle %d spawned.", carid); SendClientMessage(playerid, COLOR_GREY, string); } return 1; }if(strcmp(cmd, "/destroycars", true) == 0) { if(IsPlayerConnected(playerid)) { for(new i = 0; i < sizeof(CreatedCars)) { if(i != 0) { DestroyVehicle(i); } } SendClientMessage(playerid, COLOR_GREY, " Created Vehicles destroyed !"); } return 1; }[/pawn] Link to comment Share on other sites More sharing options...
scr3ws0f7 Posted May 21, 2011 Report Share Posted May 21, 2011 sau mai simplu iti iei un sistem de admin si are el /car :evil: <a href=http://devilone.ro></a> Link to comment Share on other sites More sharing options...
A.ALeX Posted May 21, 2011 Report Share Posted May 21, 2011 La inceputul GM adaugi new CreatedCars[100];new CreatedCar = 0;-Sub linia public OnPlayerCommandText Adaugi:[pawn]if(strcmp(cmd, "/veh", true) == 0) { if(IsPlayerConnected(playerid)) { if (PlayerInfo[playerid][pAdmin] < 4) { SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]"); return 1; } new car; car = strval(tmp); if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, " Vehicle Number can't be below 400 or above 611 !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]"); return 1; } new color1; color1 = strval(tmp); if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COLOR_GREY, " Color Number can't be below 0 or above 126 !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]"); return 1; } new color2; color2 = strval(tmp); if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, COLOR_GREY, " Color Number can't be below 0 or above 126 !"); return 1; } new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 60000); CreatedCars[CreatedCar] = carid; CreatedCar ++; format(string, sizeof(string), " Vehicle %d spawned.", carid); SendClientMessage(playerid, COLOR_GREY, string); GetPlayerName(playerid, sendername, sizeof(sendername));[/pawn]* Unde ii : if (PlayerInfo[playerid][pAdmin] < 4) - Inloc de 4 adaugi levelul minim al adminului care poate folosi comanda sau daca vrei ca toti playeri sa poata folosi comanda stergi liniaIar /skin :(tot sub linia OnPlayerCommandText )[pawn] if (strcmp("/skin", cmd, true) == 0) { if (PlayerInfo[playerid][pAdmin] >= 1) { new idskin; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /skin [skinid]"); idskin = strval(tmp); if(idskin >= 0 && idskin <= 299) { SetPlayerSkin(playerid,idskin); format(string, 256, " your skinid is now %d", idskin); SendClientMessage(playerid, COLOR_GREY, string); } else if(idskin < 0 || idskin > 299) { SendClientMessage(playerid, COLOR_GREY, " don't go under 1 and over 299."); } return 1; } }[/pawn]*if (PlayerInfo[playerid][pAdmin] >= 1) : TOT asa inloc de 1 pui lvl min al adminului care poate sa foloseasca cmd Link to comment Share on other sites More sharing options...
scr3ws0f7 Posted May 21, 2011 Report Share Posted May 21, 2011 La inceputul GM adaugi new CreatedCars[100];new CreatedCar = 0;-Sub linia public OnPlayerCommandText Adaugi:[pawn]if(strcmp(cmd, "/veh", true) == 0) { if(IsPlayerConnected(playerid)) { if (PlayerInfo[playerid][pAdmin] < 4) { SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]"); return 1; } new car; car = strval(tmp); if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, " Vehicle Number can't be below 400 or above 611 !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]"); return 1; } new color1; color1 = strval(tmp); if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COLOR_GREY, " Color Number can't be below 0 or above 126 !"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [carid] [color1] [color2]"); return 1; } new color2; color2 = strval(tmp); if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, COLOR_GREY, " Color Number can't be below 0 or above 126 !"); return 1; } new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X,Y,Z); new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 60000); CreatedCars[CreatedCar] = carid; CreatedCar ++; format(string, sizeof(string), " Vehicle %d spawned.", carid); SendClientMessage(playerid, COLOR_GREY, string); GetPlayerName(playerid, sendername, sizeof(sendername));[/pawn]* Unde ii : if (PlayerInfo[playerid][pAdmin] < 4) - Inloc de 4 adaugi levelul minim al adminului care poate folosi comanda sau daca vrei ca toti playeri sa poata folosi comanda stergi liniaIar /skin :(tot sub linia OnPlayerCommandText )[pawn] if (strcmp("/skin", cmd, true) == 0) { if (PlayerInfo[playerid][pAdmin] >= 1) { new idskin; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GREY, "USAGE: /skin [skinid]"); idskin = strval(tmp); if(idskin >= 0 && idskin <= 299) { SetPlayerSkin(playerid,idskin); format(string, 256, " your skinid is now %d", idskin); SendClientMessage(playerid, COLOR_GREY, string); } else if(idskin < 0 || idskin > 299) { SendClientMessage(playerid, COLOR_GREY, " don't go under 1 and over 299."); } return 1; } }[/pawn]*if (PlayerInfo[playerid][pAdmin] >= 1) : TOT asa inloc de 1 pui lvl min al adminului care poate sa foloseasca cmdesti total paralel ce tot zici tu cu padmin.... :shocked: <a href=http://devilone.ro></a> Link to comment Share on other sites More sharing options...
Question
Freddie
Nu am comanda /veh si /skin, si nici nu o gasesc, am gasit un topic pe forum in care era si comanda, doar ca de la comanda aia aveam 15 erori...
Unde le pot gasi ? :|
PS : Nu am GM de pe net, fac GM-ul de la 0 si probabil ca nu-mi mergea cpmanda aia ca nu am lucrurile definite...
Link to comment
Share on other sites
6 answers to this question
Recommended Posts