stefanel994 Posted January 31, 2011 Report Share Posted January 31, 2011 Am facut o comanda zilele astea si am o intrebare //----------------------------[depune]-------------------------------------------------// if(strcmp(cmd,"/depune",true)==0) { if(IsPlayerConnected(playerid)) { if(PlayerToPoint(25.0,playerid,653.7766,-496.4872,16.3359)) { new x_nr[256]; x_nr = strtok(cmdtext, idx); if(!strlen(x_nr)) { SendClientMessage(playerid, COLOR_WHITE, "|__________________ Depune __________________|"); SendClientMessage(playerid, COLOR_WHITE, "USAGE: /depune [name]"); SendClientMessage(playerid, COLOR_GREY, "Available names: mats, drugs"); SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|"); return 1; } if(strcmp(x_nr,"mats",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]"); format(string, sizeof(string), " You Have %d Mats on you.", PlayerInfo[playerid][pMats]); SendClientMessage(playerid, COLOR_GRAD3, string); return 1; } new matss; matss = strval(tmp); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Mats [amount]"); format(string, sizeof(string), " You Have %d Mats on you.", PlayerInfo[playerid][pMats]); SendClientMessage(playerid, COLOR_GRAD3, string); return 1; } if(matss > PlayerInfo[playerid][pMats]) { SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!"); return 1; } PlayerInfo[playerid][pMats] -= matss; PlayerInfo[playerid][pBoxMats] += matss; format(string, sizeof(string), " %d materials deposited!", matss); SendClientMessage(playerid, COLOR_GRAD4, string); return 1; } else if(strcmp(x_nr,"drugs",true) == 0) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]"); format(string, sizeof(string), " You Have %d Drugs on you.", PlayerInfo[playerid][pDrugs]); SendClientMessage(playerid, COLOR_GRAD3, string); return 1; } new drugss; drugss = strval(tmp); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USAGE: Drugs [amount]"); format(string, sizeof(string), " You Have %d Drugs on you.", PlayerInfo[playerid][pDrugs]); SendClientMessage(playerid, COLOR_GRAD3, string); return 1; } if(drugss > PlayerInfo[playerid][pDrugs]) { SendClientMessage(playerid, COLOR_GRAD2, " You don't have that many!"); return 1; } PlayerInfo[playerid][pDrugs] -= drugss; PlayerInfo[playerid][pBoxDrugs] += drugss; format(string, sizeof(string), " %d Drugs deposited!", drugss); SendClientMessage(playerid, COLOR_GRAD4, string); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You are not in the safebox place !"); return 1; } }//not connected return 1; }Cum o pot face sa paote fi folosita in mai multe locuri si cum pot face sa o foloseasca doar membri unei anuminte factiuni. Link to comment Share on other sites More sharing options...
leon Posted January 31, 2011 Report Share Posted January 31, 2011 1. Pui la if(PlayerToPoint(25.0,playerid,653.7766,-496.4872,16.3359))if(PlayerToPoint(25.0,playerid,653.7766,-496.4872,16.3359) || PlayerToPoint(25.0,playerid,x,y,z) || PlayerToPoint(25.0,playerid,x,y,z)) 2. Adaugi linia asta if(PlayerInfo[playerid][pMember] == X || PlayerInfo[playerid][pLearer] == X || PlayerInfo[playerid][pMember] == X || PlayerInfo[playerid][pLearer] == X) Link to comment Share on other sites More sharing options...
stefanel994 Posted January 31, 2011 Author Report Share Posted January 31, 2011 stiam si eu ca tb adaugate astea dar qm xD poti sa mi le pui tu in comanda direct xd cele cu faction membre alea cu pozitiile lea rez xD Link to comment Share on other sites More sharing options...
IstuntmanI Posted January 31, 2011 Report Share Posted January 31, 2011 Citeste si tu regulile, ca nu strica.http://www.sa-mp.ro/forum/index.php/topic,5356.0.html Link to comment Share on other sites More sharing options...
Question
stefanel994
Am facut o comanda zilele astea si am o intrebare
Cum o pot face sa paote fi folosita in mai multe locuri si cum pot face sa o foloseasca doar membri unei anuminte factiuni.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts