SA-MP Forums Archive
text 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: text problem (/showthread.php?tid=256303)



text problem - CrazyBlob - 20.05.2011

k well when you enter checkpoint [2] it does the code for checkpoint 1?


and when you enter checkpoint [1] it does the code for checkpoint 1 fine


Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == wcp1[playerid])
	{
	        DestroyDynamicCP(wcp1[playerid]);
            inwork[playerid] = 0;
            GivePlayerMoney(playerid, 7500);
            GameTextForPlayer(playerid, "~g~Mission Complete!~n~~r~You Received ~g~$7500", 3000, 3);
            new pname[MAX_PLAYER_NAME], string[100 + MAX_PLAYER_NAME];
		    GetPlayerName(playerid, pname, sizeof(pname));
		    format(string, sizeof(string), "{F3FF02}%s {FFAF00}Has Delivered {00FFEE}Lotto Tickets {FFAF00}To{FFFFFF}: {6EF83C}Otto's Auto", pname);
		    SendClientMessageToAll(0xAAAAAAAA, string);
		    return 1;
	}
	if(checkpointid == wcp2[playerid])
	{
	        DestroyDynamicCP(wcp2[playerid]);
            inwork[playerid] = 0;
            GivePlayerMoney(playerid, 5000);
            GameTextForPlayer(playerid, "~g~Mission Complete!~n~~r~You Received ~g~$5000", 3000, 3);
            new pname[MAX_PLAYER_NAME], string[100 + MAX_PLAYER_NAME];
		    GetPlayerName(playerid, pname, sizeof(pname));
		    format(string, sizeof(string), "{F3FF02}%s {FFAF00}Has Delivered {00FFEE}Donuts {FFAF00}To{FFFFFF}: {6EF83C}Fort Carson Sheriff", pname);
		    SendClientMessageToAll(0xAAAAAAAA, string);
		    return 1;
	}
	return 1;
}
thanks


Re: text problem - Steve M. - 20.05.2011

Show us the code where you create the checkpoints.