23.11.2018, 14:42
Код HTML:
if(strcmp(cmd, "/christmasgift", true) == 0) { if(IsPlayerInRangeOfPoint(playerid, 2, 1478.8036,-1647.9786,14.1484) && PlayerInfo[playerid][pDonateRank] == 0) { if(GottenGift[playerid] == 1) return SendClientMessage(playerid, COLOR_GRAD1, "You have to wait 5 hours in between getting gifts! Try again later!"); format(string5, sizeof(string5), "* %s closes his eyes reaching into the safe pulling something out...", PlayerRPName(playerid)); ProxDetector(30.0, playerid, string5, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); new randomgift = random(8); if(randomgift == 0) { PlayerInfo[playerid][pMats] += 5000; format(string5, sizeof(string5), "* 5,000 Materials. (( %s ))", PlayerRPName(playerid)); ProxDetector(30.0, playerid, string5, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GottenGift[playerid] = 1; GottenTimeLeft[playerid] = 18000000; } else if(randomgift == 1) { PlayerInfo[playerid][pCash] += 50000; format(string5, sizeof(string5), "* $50,000. (( %s ))", PlayerRPName(playerid)); ProxDetector(30.0, playerid, string5, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GottenGift[playerid] = 1; GottenTimeLeft[playerid] = 18000000; } else if(randomgift == 2) { PlayerInfo[playerid][pCash] += 10000; format(string5, sizeof(string5), "* $10,000. (( %s ))", PlayerRPName(playerid)); ProxDetector(30.0, playerid, string5, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GottenGift[playerid] = 1; GottenTimeLeft[playerid] = 18000000; } else if(randomgift == 3) { PlayerInfo[playerid][pPot] += 50; format(string5, sizeof(string5), "* 50 Grams of pot. (( %s ))", PlayerRPName(playerid)); ProxDetector(30.0, playerid, string5, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GottenGift[playerid] = 1; GottenTimeLeft[playerid] = 18000000; } else if(randomgift == 4) { PlayerInfo[playerid][pCrack] += 25; format(string5, sizeof(string5), "* 25 Grams of crack. (( %s ))", PlayerRPName(playerid)); ProxDetector(30.0, playerid, string5, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GottenGift[playerid] = 1; GottenTimeLeft[playerid] = 18000000; } else if(randomgift == 5) { GivePlayerGun(playerid, 24); GivePlayerGun(playerid, 27); GivePlayerGun(playerid, 31); GivePlayerGun(playerid, 34); format(string5, sizeof(string5), "* A full weapon set. (( %s ))", PlayerRPName(playerid)); ProxDetector(30.0, playerid, string5, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GottenGift[playerid] = 1; GottenTimeLeft[playerid] = 18000000; } else if(randomgift == 6) { PlayerInfo[playerid][pPotSeeds] += 20; format(string5, sizeof(string5), "* 20 Pot seeds. (( %s ))", PlayerRPName(playerid)); ProxDetector(30.0, playerid, string5, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GottenGift[playerid] = 1; GottenTimeLeft[playerid] = 18000000; } else if(randomgift == 7) { PlayerInfo[playerid][pPotSeeds] += 10; format(string5, sizeof(string5), "* 10 Pot seeds. (( %s ))", PlayerRPName(playerid)); ProxDetector(30.0, playerid, string5, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GottenGift[playerid] = 1; GottenTimeLeft[playerid] = 18000000; } else if(randomgift == 8) { PlayerInfo[playerid][pMats] += 10000; format(string5, sizeof(string5), "* 10,000 Materials. (( %s ))", PlayerRPName(playerid)); ProxDetector(30.0, playerid, string5, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); GottenGift[playerid] = 1; GottenTimeLeft[playerid] = 18000000; } } else { SendClientMessage(playerid, COLOR_RED, "** You are not near the christmas tree!"); } return 1; }
When ever i go near the tree and type /christmasgift , the dialog is now appearing and it says you are not near the tree... whats wrong with his command?
the coordinate for that place AddPlayerClass(299,1478.8036,-1647.9786,14.1484,349.4066,0,0,0,0,0,0); // christmas