- เครดิต
- 4921
- ความรู้
-
- เงิน $
-
- ความดี
-
|
- if(strcmp(cmd, "/givebox", true) == 0)
- {
- if (PlayerInfo[playerid][pAdmin] >= 1390 && PlayerInfo[playerid][pAdmin] < 5000 ||PlayerInfo[playerid][pAdmin] >= 9999)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "¡ÒÃãªé§Ò¹: /givebox [äÍ´Õ/ª×èÍ] [¨Ó¹Ç¹¡Åèͧ]");
- return 1;
- }
- //giveplayerid = strval(tmp);
- giveplayerid = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "¡ÒÃãªé§Ò¹: /givebox [äÍ´Õ/ª×èÍ] [¨Ó¹Ç¹¡Åèͧ]");
- return 1;
- }
- new playa;
- GetPlayerName(playa, sendername, sizeof(sendername));
- playa = ReturnUser(tmp);
- moneys = strval(tmp);
- PlayerInfo[giveplayerid][pBox] = moneys;
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, 256, "AdmWarning: %s ä´éãËé¡Åèͧá¡è %s ¨Ó¹Ç¹ %d", sendername,giveplayer,moneys);
- ABroadCast(COLOR_YELLOW,string,1);
- format(string, sizeof(string), "* %s ä´éãËé¡Åèͧ¤Ø³ %s", sendername, giveplayer);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/takebox", true) == 0)
- {
- if (PlayerInfo[playerid][pAdmin] >= 1390)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "¡ÒÃãªé§Ò¹: /takebox [äÍ´Õ/ª×èÍ] [¨Ó¹Ç¹¡Åèͧ]");
- return 1;
- }
- //giveplayerid = strval(tmp);
- giveplayerid = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD1, "¡ÒÃãªé§Ò¹: /takebox [äÍ´Õ/ª×èÍ] [¨Ó¹Ç¹¡Åèͧ]");
- return 1;
- }
- new playa;
- GetPlayerName(playa, sendername, sizeof(sendername));
- playa = ReturnUser(tmp);
- moneys = strval(tmp);
- PlayerInfo[giveplayerid][pBox] -= moneys;
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- format(string, 256, "AdmWarning: %s ä´éÂÖ´¡Åèͧ¢Í§ %s ¨Ó¹Ç¹ %d", sendername,giveplayer,moneys);
- ABroadCast(COLOR_YELLOW,string,1);
- format(string, sizeof(string), "* %s ä´éÂÖ´¡Åèͧ¤Ø³%s", sendername, giveplayer);
- ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/openbox", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(PlayerInfo[playerid][pBox] < 1)
- {
- SendClientMessage(playerid, COLOR_GREY, " ¤Ø³ÁÕäÁèÁÕ¡ÅèͧäÁè¾Í !");
- return 1;
- }
- PlayerInfo[playerid][pBox] -= 1;
- new rand;
- GameTextForPlayer(playerid, "~r~ Opening box", 5000, 1);
- rand = random(999);
- GetPlayerName(playerid,sendername, sizeof(sendername));
- if(rand >= 0 && rand <= 1)
- {
- SendClientMessage(playerid, COLOR_GREEN, "[BOX]: ¤Ø³à»Ô´ä´é¡Åèͧà§Ô¹áÅÐä´éÃѺà§Ô¹Ê´ $300,000");
- SafeGivePlayerMoney(playerid,300000);
- return 1;
- }
- else if(rand >= 2 && rand <= 34)
- {
- SendClientMessage(playerid, COLOR_GREEN, "[BOX]: ¤Ø³à»Ô´ä´é¡Åèͧ·Í§á´§áÅÐä´éÃѺà§Ô¹Ê´ $25,000");
- SafeGivePlayerMoney(playerid,25000);
- return 1;
- }
- else if(rand >= 35 && rand <= 45)
- {
- SendClientMessage(playerid, COLOR_GREEN, "[BOX]: ¤Ø³à»Ô´ä´é¡Åèͧ»ÃÔȹÒáÅÐä´éÃѺ Upgrade Point +1");
- PlayerInfo[playerid][gPupgrade] += 1;
- return 1;
- }
- else if(rand >= 46 && rand <= 80)
- {
- SendClientMessage(playerid, COLOR_GREEN, "[BOX]: ¤Ø³à»Ô´ä´é¡Åèͧ»ÃÔȹÒáÅÐä´éÃѺàÅ×Í´àµéÁµÍ¹à¡Ô´");
- PlayerInfo[giveplayerid][pSHealth] = 100;
- return 1;
- }
- else if(rand >= 81 && rand <= 100)
- {
- SendClientMessage(playerid, COLOR_GREEN, "[BOX]: ¤Ø³à»Ô´ä´é¡Åèͧ»ÃÔȹÒáÅÐä´éÃѺ EXP +1");
- PlayerInfo[playerid][pExp] += 1;
- return 1;
- }
- else if(rand >= 101 && rand <= 200)
- {
- SendClientMessage(playerid, COLOR_GREEN, "[BOX]: ¤Ø³à»Ô´ä´é¡Åèͧ´ÓáÅÐä´éÃѺ»×¹ Desert Egle ä»ãªé 140 ¹Ñ´");
- SafeGivePlayerWeapon(playerid, 24, 140);
- return 1;
- }
- else if(rand >= 201 && rand <= 300)
- {
- SendClientMessage(playerid, COLOR_GREEN, "[BOX]: ¤Ø³à»Ô´ä´é¡Åèͧ´ÓáÅÐä´éÃѺ»×¹ AK47 ä»ãªé 240 ¹Ñ´");
- SafeGivePlayerWeapon(playerid, 30, 240);
- return 1;
- }
- else if(rand >= 301 && rand <= 400)
- {
- SendClientMessage(playerid, COLOR_GREEN, "[BOX]: ¤Ø³à»Ô´ä´é¡Åèͧ´ÓáÅÐä´éÃѺ»×¹ ÃÐàºÔ´ ä»ãªé 50 ÅÙ¡");
- SafeGivePlayerWeapon(playerid, 16, 50);
- return 1;
- }
- else if(rand >= 401 && rand <= 500)
- {
- SendClientMessage(playerid, COLOR_GREEN, "[BOX]: ¤Ø³à»Ô´ä´é¡Åèͧ´ÓáÅÐä´éÃѺ»×¹ M4A1 ä»ãªé 300 ¹Ñ´");
- SafeGivePlayerWeapon(playerid, 31, 300);
- return 1;
- }
- else if(rand >= 501 && rand <= 600)
- {
- SendClientMessage(playerid, COLOR_GREEN, "[BOX]: ¤Ø³à»Ô´ä´é¡Åèͧ´ÓáÅÐä´éÃѺ»×¹ MP5 ä»ãªé 240 ¹Ñ´");
- SafeGivePlayerWeapon(playerid, 29, 240);
- return 1;
- }
- else if(rand >= 601 && rand <= 999)
- {
- SendClientMessage(playerid, COLOR_GREEN, "[BOX]: ¤Ø³à»Ô´ä´é¡Åèͧ¼ÕÊÔ§áÅФسäÁèä´éÃѺÍÐäÃàÅÂ");
- return 1;
- }
- }
- }
คัดลอกไปที่คลิปบอร์ด |
|