26.01.2016, 19:54
Quote:
try figuring it out with some debug messages...
Код:
public LoadChecks(playerid) { for(new i = 0; i < sizeof(CheckpointAreas); i++) { if(IsPlayerInRangeOfPoint(playerid,20.0,CheckpointAreas[i][0],CheckpointAreas[i][1],CheckpointAreas[i][2])) { SetPlayerCheckpoint(playerid,CheckpointAreas[i][3],CheckpointAreas[i][4],CheckpointAreas[i][5],1.0); SetPVarInt(playerid, "Checkpoint", CheckpointAreaType[i][0]); printf("set to number %d", i); } } return 1; } Код:
public OnPlayerEnterCheckpoint(playerid) { prinf("pvar 'Checkpoint' has value %d - Clothes should be %d", GetPVarInt(playerid, "Checkpoint"), CHECKPOINT_CLOTHES); switch(GetPVarInt(playerid, "Checkpoint")) { case CHECKPOINT_NONE: DisablePlayerCheckpoint(playerid); case CHECKPOINT_CLOTHES: { GameTextForPlayer(playerid, "~b~~h~Clothing Shop~n~~w~Outfit: ~g~$200~n~~r~/clothes~n~(/items for hats, glases etc..)", 3000, 5); } } retrun 1; } edit: you could btw use "default: DisablePlayerCheckpoint(playerid);" instead of defining "CHECKPOINT_NONE" |
Код:
printf("set to number %d", i);
Код:
public OnPlayerEnterCheckpoint(playerid) { prinf("pvar 'Checkpoint' has value %d - Clothes should be %d", GetPVarInt(playerid, "Checkpoint"), CHECKPOINT_CLOTHES); switch(GetPVarInt(playerid, "Checkpoint")) { case CHECKPOINT_NONE: DisablePlayerCheckpoint(playerid); case CHECKPOINT_CLOTHES: { GameTextForPlayer(playerid, "~b~~h~Clothing Shop~n~~w~Outfit: ~g~$200~n~~r~/clothes~n~(/items for hats, glases etc..)", 3000, 5); } } retrun 1; }