SA-MP Forums Archive
Small help - 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: Small help (/showthread.php?tid=424608)



Small help - Squirrel - 23.03.2013

Why is this command working for everyone? o.o

Код:
CMD:perk(playerid, params[])
{
	if(PlayerInfo[playerid][pPerk] == dB)
	{
	    new drugs = randomEx(1,10);
		new string[128];
		format(string, sizeof(string), "You received %d drugs", drugs);
		SendClientMessage(playerid, COLOR_YELLOW, string);
		PlayerInfo[playerid][pWeed] += drugs;
		return 1;
	}
	return 1;
}
The command should work only if you have dB


Re: Small help - faff - 23.03.2013

pawn Код:
CMD:perk(playerid, params[])
{
    new drugs = randomEx(1,10);
        new string[128];
    if(PlayerInfo[playerid][pPerk] == dB)
    {

        format(string, sizeof(string), "You received %d drugs", drugs);
        SendClientMessage(playerid, COLOR_YELLOW, string);
        PlayerInfo[playerid][pWeed] += drugs;
        return 1;
    }
        else{
    format(string, sizeof(string), "You dont have Db.");
    SendClientMessage(playerid, COLOR_YELLOW, string);
       }

    return 1;
}



Re: Small help - Squirrel - 23.03.2013

Thanks mate.