text problem
#1

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
Reply
#2

Show us the code where you create the checkpoints.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)