SA-MP Forums Archive
BuySim problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: BuySim problem (/showthread.php?tid=434579)



BuySim problem - yaron0600 - 03.05.2013

Buy sim command :

See if thats good so I can continue please and how can I do that it gives u Sim after u do that ? ? ?

Код:
CMD:buysim(playerid, params[])
{
if(IsPlayerInRangeOfPoint(playerid, 6, 920.421142, -1361.637084, 13.003659)) {
		SendClientMessageEx(playerid,COLOR_GREY,"   You are not at the Telecom Company Arena!");
	else if(GetPVarType(playerid, "Sim")) {
		SendClientMessageEx(playerid, COLOR_GREY, "   You are already have Sim!");
		return 1;
	}



Re: BuySim problem - Gamer_007 - 03.05.2013

I think using variable is better than PVar and btw you need a correction at line IsPlayerInRangeOfPoint

pawn Код:
CMD:buysim(playerid, params[])
{
if(!IsPlayerInRangeOfPoint(playerid, 6, 920.421142, -1361.637084, 13.003659)) {
        SendClientMessageEx(playerid,COLOR_GREY,"   You are not at the Telecom Company Arena!");
    else if(GetPVarType(playerid, "Sim")) {
        SendClientMessageEx(playerid, COLOR_GREY, "   You are already have Sim!");
        return 1;
    }



Re: BuySim problem - yaron0600 - 03.05.2013

Thats very nice that u fixed me and thanks but I need to make thats giving Sim how to do that ? ? ?


Re: BuySim problem - Gamer_007 - 03.05.2013

LOL!! OFC using a variable.Make it 1 when it is success simple and add stuffs as you want


Re: BuySim problem - yaron0600 - 03.05.2013

HOW man...