20.03.2013, 18:52
Quote:
From what I see, hard work, and for that, first of all, congrats. But, I probably didn't get this much since you didn't explain much. On your note that it reduces the 'hassle' of a lot of code under one call back, I find (personal opinion) it quite easier to group all checkpoint checks under one callback rather than two for each. So can you explain a bit more about this?
|
Code:
#include <dynamiccp> public OnGameModeInit() { AddDynamicCP(1000.0, 1000.0, 1000.0, 2.0, "TestCP1") AddDynamicCP(1000.0, 1000.0, 1000.0, 2.0, "TestCP2") AddDynamicCP(1000.0, 1000.0, 1000.0, 2.0, "TestCP3") AddDynamicCP(1000.0, 1000.0, 1000.0, 2.0, "TestCP4") } OnCheckPoint:TestCP1(playerid, cpid, cpindex) { SendClientMessage(playerid, "You entered the TestCP1"); return 1; } ExitCheckPoint:TestCP1(playerid, cpid, cpindex) { SendClientMessage(playerid, "You left the TestCP1"); return 1; } OnCheckPoint:TestCP2(playerid, cpid, cpindex) { SendClientMessage(playerid, "You entered the TestCP2"); return 1; } ExitCheckPoint:TestCP2(playerid, cpid, cpindex) { SendClientMessage(playerid, "You left the TestCP2"); return 1; } OnCheckPoint:TestCP3(playerid, cpid, cpindex) { SendClientMessage(playerid, "You entered the TestCP3"); return 1; } ExitCheckPoint:TestCP3(playerid, cpid, cpindex) { SendClientMessage(playerid, "You left the TestCP3"); return 1; } OnCheckPoint:TestCP4(playerid, cpid, cpindex) { SendClientMessage(playerid, "You entered the TestCP4"); return 1; } ExitCheckPoint:TestCP4(playerid, cpid, cpindex) { SendClientMessage(playerid, "You left the TestCP4"); return 1; }