25.10.2009, 18:23
FIXED! I CANT BELIVE I DID IT!
Fixed version below...Код:
public OnPlayerEnterCheckpoint(playerid) { new pName[24], PlayerFile[50], pMatPackages[50], pJob[50], pMats[50]; GetPlayerName(playerid, pName, sizeof(pName)); format(PlayerFile, sizeof(PlayerFile), "/users/%s.ini", pName); if(!dini_Exists(PlayerFile)) return 0; if(dini_Exists(PlayerFile)) { pMatPackages[24] = dini_Int(PlayerFile, "MaterialPackages"); pJob[24] = dini_Int(PlayerFile, "Job"); pMats[24] = dini_Int(PlayerFile, "Materials"); if(PlayerInfo[playerid][Job] == 1) { if(PlayerInfo[playerid][MaterialPackages] == 10) { PlayerInfo[playerid][MaterialPackages] = 0; PlayerInfo[playerid][Materials] += 250; SendClientMessage(playerid, COLOR_WHITE, "You have bought some material packages"); dini_IntSet(PlayerFile, "MaterialPackages", 0); dini_IntSet(PlayerFile, "Materials", PlayerInfo[playerid][Materials]); SetPlayerCheckpoint(playerid, 1319.0309,1251.1731,10.8203, 1.5); } else { SendClientMessage(playerid, COLOR_BRIGHTRED, "You arn't at the materials package pickup!"); } } else { SendClientMessage(playerid, COLOR_BRIGHTRED, "You already have some packages, go drop them off!"); } } return 1; }