IsPlayerInRangeOfPoint << +REP >> -
Gogorakis - 18.11.2013
Hello guys..I created a filescript ((/buygun - /prices)) but I need to set a position ((IsPlayerInRangeOfPoint)) but when I put it , it give me errors...Can you place it for me?
I usually work with ZCMD... THANK YOU !!
(Put the range 0 , 0 , 0 - I will replace them)...
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/buygun", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid,160,DIALOG_STYLE_LIST,"Weapon System [By Gregory]","Brass Knuckles\nGolf Club\nNightstick\nKnife\nBaseball Bat\nShovel\nSprayCan\nPool Cue\nKatana\nChainsaw\nDouble-ended Dildo\nDildo\nVibrator\nSilver Vibrator\nFlowers\nCane\nParachute\nTear Gas\n9mm\nSilenced 9mm\nDesert Eagle\nShoutgun\nCombat Shotgun\nMicro SMG/UZI\nMP5\nAK-47\nM4\nTec-9\nCountry Rifle\nSniper Rifle","Buy","Cancel");
return 1;
}
if (strcmp("/prices", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_WHITE, "_____________________________________________________________________________________________");
SendClientMessage(playerid, COLOR_WHITE, "Brass Knuckles (25$) | Golf Club (50$) | Nightstick (100$) | Knife (200$)");
SendClientMessage(playerid, COLOR_WHITE, "Baseball Bat (150$) | Shovel (100$) | SprayCan (500$) | Pool Cue (30$) | Katana (100$)");
SendClientMessage(playerid, COLOR_WHITE, "Chainsaw (2000$) | Double-ended Dildo (500$) | Dildo (450$) | Vibrator (300$)");
SendClientMessage(playerid, COLOR_WHITE, "Silver Vibrator (350$) | Flowers (10$) | Cane (30$) | Parachute (100$) | Tear Gas (1000$)");
SendClientMessage(playerid, COLOR_WHITE, "9mm (1500$) | Silenced 9mm (1600$) | Desert Eagle (3000$) | Shotgun (2800$)");
SendClientMessage(playerid, COLOR_WHITE, "Combat Shotgun (3500$) | Micro SMG/UZI (2500$) | MP5 (5000$) | AK-47 (4500$)");
SendClientMessage(playerid, COLOR_WHITE, "M4 (5000$) | Tec-9 (3000$) | Country Rifle (6000$) | Sniper Rifle (7000$)");
SendClientMessage(playerid, COLOR_WHITE, "_____________________________________________________________________________________________");
return 1;
}
return 0;
}
Re: IsPlayerInRangeOfPoint << +REP >> -
PrivatioBoni - 18.11.2013
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/buygun", cmdtext, true, 10) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 0, 0, 0)) return SendClientMessage(playerid, COLOR_WHITE, "Not in range.");
else
{
ShowPlayerDialog(playerid,160,DIALOG_STYLE_LIST,"Weapon System [By Gregory]","Brass Knuckles\nGolf Club\nNightstick\nKnife\nBaseball Bat\nShovel\nSprayCan\nPool Cue\nKatana\nChainsaw\nDouble-ended Dildo\nDildo\nVibrator\nSilver Vibrator\nFlowers\nCane\nParachute\nTear Gas\n9mm\nSilenced 9mm\nDesert Eagle\nShoutgun\nCombat Shotgun\nMicro SMG/UZI\nMP5\nAK-47\nM4\nTec-9\nCountry Rifle\nSniper Rifle","Buy","Cancel");
}
return 1;
}
if (strcmp("/prices", cmdtext, true, 10) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 0, 0, 0)) return SendClientMessage(playerid, COLOR_WHITE, "Not in range.");
else
{
SendClientMessage(playerid, COLOR_WHITE, "_____________________________________________________________________________________________");
SendClientMessage(playerid, COLOR_WHITE, "Brass Knuckles (25$) | Golf Club (50$) | Nightstick (100$) | Knife (200$)");
SendClientMessage(playerid, COLOR_WHITE, "Baseball Bat (150$) | Shovel (100$) | SprayCan (500$) | Pool Cue (30$) | Katana (100$)");
SendClientMessage(playerid, COLOR_WHITE, "Chainsaw (2000$) | Double-ended Dildo (500$) | Dildo (450$) | Vibrator (300$)");
SendClientMessage(playerid, COLOR_WHITE, "Silver Vibrator (350$) | Flowers (10$) | Cane (30$) | Parachute (100$) | Tear Gas (1000$)");
SendClientMessage(playerid, COLOR_WHITE, "9mm (1500$) | Silenced 9mm (1600$) | Desert Eagle (3000$) | Shotgun (2800$)");
SendClientMessage(playerid, COLOR_WHITE, "Combat Shotgun (3500$) | Micro SMG/UZI (2500$) | MP5 (5000$) | AK-47 (4500$)");
SendClientMessage(playerid, COLOR_WHITE, "M4 (5000$) | Tec-9 (3000$) | Country Rifle (6000$) | Sniper Rifle (7000$)");
SendClientMessage(playerid, COLOR_WHITE, "_____________________________________________________________________________________________");
}
return 1;
}
Hi, should work. If it doesn't, it could be because I misplaced a curly bracket.
Re: IsPlayerInRangeOfPoint << +REP >> -
J4mmyHD - 18.11.2013
pawn Код:
if (strcmp ("/ buygun", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 30, X, Y, Z)) return SendClientMessage(playerid, COLOR_WHITE, "You are not at a gun store!");
ShowPlayerDialog (playerid, 160, DIALOG_STYLE_LIST, "Weapon System [By Gregory]", "Brass Knuckles \ nGolf Club \ nNightstick \ nKnife \ nBaseball Bat \ nShovel \ nSprayCan \ nPool Cue \ nKatana \ nChainsaw \ nDouble-ended Dildo \ nDildo \ nVibrator \ nSilver Vibrator \ nFlowers \ nCane \ nParachute \ nTear Gas \ n9mm \ nSilenced 9mm \ nDesert Eagle \ nShoutgun \ nCombat Shotgun \ nMicro SMG / UZI \ nMP5 \ NAK-47 \ NM4 \ NTEC-9 \ nCountry Rifle \ nSniper Rifle " "Buy", "Cancel");
return 1;
}
pawn Код:
if (strcmp("/prices", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 30, X, Y, Z)) return SendClientMessage(playerid, COLOR_WHITE, "You are not at a gun store!");
SendClientMessage(playerid, COLOR_WHITE, "_____________________________________________________________________________________________");
SendClientMessage(playerid, COLOR_WHITE, "Brass Knuckles (25$) | Golf Club (50$) | Nightstick (100$) | Knife (200$)");
SendClientMessage(playerid, COLOR_WHITE, "Baseball Bat (150$) | Shovel (100$) | SprayCan (500$) | Pool Cue (30$) | Katana (100$)");
SendClientMessage(playerid, COLOR_WHITE, "Chainsaw (2000$) | Double-ended Dildo (500$) | Dildo (450$) | Vibrator (300$)");
SendClientMessage(playerid, COLOR_WHITE, "Silver Vibrator (350$) | Flowers (10$) | Cane (30$) | Parachute (100$) | Tear Gas (1000$)");
SendClientMessage(playerid, COLOR_WHITE, "9mm (1500$) | Silenced 9mm (1600$) | Desert Eagle (3000$) | Shotgun (2800$)");
SendClientMessage(playerid, COLOR_WHITE, "Combat Shotgun (3500$) | Micro SMG/UZI (2500$) | MP5 (5000$) | AK-47 (4500$)");
SendClientMessage(playerid, COLOR_WHITE, "M4 (5000$) | Tec-9 (3000$) | Country Rifle (6000$) | Sniper Rifle (7000$)");
SendClientMessage(playerid, COLOR_WHITE, "_____________________________________________________________________________________________");
return 1;
}
Re: IsPlayerInRangeOfPoint << +REP >> -
PakistaniBaba - 18.11.2013
pawn Код:
if (strcmp ("/buygun", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 3, 00.00, 00.00, 00.00)) return SendClientMessage(playerid, COLOR_WHITE, "You are not at ammo shop!");
ShowPlayerDialog (playerid, 160, DIALOG_STYLE_LIST, "Weapon System [By Gregory]", "Brass Knuckles \ nGolf Club \ nNightstick \ nKnife \ nBaseball Bat \ nShovel \ nSprayCan \ nPool Cue \ nKatana \ nChainsaw \ nDouble-ended Dildo \ nDildo \ nVibrator \ nSilver Vibrator \ nFlowers \ nCane \ nParachute \ nTear Gas \ n9mm \ nSilenced 9mm \ nDesert Eagle \ nShoutgun \ nCombat Shotgun \ nMicro SMG / UZI \ nMP5 \ NAK-47 \ NM4 \ NTEC-9 \ nCountry Rifle \ nSniper Rifle " "Buy", "Cancel");
return 1;
}
Remove 00.00 from it and add your location (playerid, 3, 00.00, 00.00, 00.00)
Re: IsPlayerInRangeOfPoint << +REP >> -
erminpr0 - 18.11.2013
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp("/buygun", cmdtext))
{
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 0, 0, 0))
return SendClientMessage(playerid, COLOR_WHITE, "Not in range.");
ShowPlayerDialog(playerid,160,DIALOG_STYLE_LIST,"Weapon System [By Gregory]","Brass Knuckles\nGolf Club\nNightstick\nKnife\nBaseball Bat\nShovel\nSprayCan\nPool Cue\nKatana\nChainsaw\nDouble-ended Dildo\nDildo\nVibrator\nSilver Vibrator\nFlowers\nCane\nParachute\nTear Gas\n9mm\nSilenced 9mm\nDesert Eagle\nShoutgun\nCombat Shotgun\nMicro SMG/UZI\nMP5\nAK-47\nM4\nTec-9\nCountry Rifle\nSniper Rifle","Buy","Cancel");
return 1;
}
if(!strcmp(cmdtext, "/prices"))
{
if(!IsPlayerInRangeOfPoint(playerid, 7.0, 0, 0, 0))
return SendClientMessage(playerid, COLOR_WHITE, "Not in range.");
SendClientMessage(playerid, COLOR_WHITE, "_____________________________________________________________________________________________");
SendClientMessage(playerid, COLOR_WHITE, "Brass Knuckles (25$) | Golf Club (50$) | Nightstick (100$) | Knife (200$)");
SendClientMessage(playerid, COLOR_WHITE, "Baseball Bat (150$) | Shovel (100$) | SprayCan (500$) | Pool Cue (30$) | Katana (100$)");
SendClientMessage(playerid, COLOR_WHITE, "Chainsaw (2000$) | Double-ended Dildo (500$) | Dildo (450$) | Vibrator (300$)");
SendClientMessage(playerid, COLOR_WHITE, "Silver Vibrator (350$) | Flowers (10$) | Cane (30$) | Parachute (100$) | Tear Gas (1000$)");
SendClientMessage(playerid, COLOR_WHITE, "9mm (1500$) | Silenced 9mm (1600$) | Desert Eagle (3000$) | Shotgun (2800$)");
SendClientMessage(playerid, COLOR_WHITE, "Combat Shotgun (3500$) | Micro SMG/UZI (2500$) | MP5 (5000$) | AK-47 (4500$)");
SendClientMessage(playerid, COLOR_WHITE, "M4 (5000$) | Tec-9 (3000$) | Country Rifle (6000$) | Sniper Rifle (7000$)");
SendClientMessage(playerid, COLOR_WHITE, "_____________________________________________________________________________________________");
return 1;
}
return false;
}