21.02.2010, 16:29
Hello, I was scripting my point system for my factions, When I made a /aresetpoint, the name doesn't change and stay " ".
I got exactly the same as my faction system and that works perfect....
Faction:
WTF? I get sick of it , Maybe somebody of you guys see it?
I got exactly the same as my faction system and that works perfect....
Код:
if(strcmp(cmd, "/aresetpoint", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_RED, "» /aresetpoint [pointid 0-9]"); return 1; } new factionid = strval(tmp); if (PlayerStats[playerid][Admin] >= 20) { DynamicPoints[factionid][Price] = 0; strmid(DynamicPoints[factionid][PointName], "NoneName", 0, strlen(string), 255); strmid(DynamicPoints[factionid][CurrentOwner], "Nobody", 0, strlen(string), 255); format(string, sizeof(string), "» You have reset Point ID: %d.", factionid); SendClientMessage(playerid, COLOR_YELLOW, string); SavePoints(); } else { SendClientMessage(playerid, COLOR_RED, "» Your not an administrator or an administrator with the required level."); } } return 1; }
Код:
if(strcmp(cmd, "/aresetfaction", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_RED, "» /aresetfaction [factionid]"); return 1; } new factionid = strval(tmp); if (PlayerStats[playerid][Admin] >= 20) { new rank; format(string, sizeof(string), "Family%d",factionid); strmid(DynamicFactions[factionid][fName], string, 0, strlen(string), 255); DynamicFactions[factionid][fX] = 0.0; DynamicFactions[factionid][fY] = 0.0; DynamicFactions[factionid][fZ] = 0.0; DynamicFactions[factionid][fMaterials] = 0; DynamicFactions[factionid][fDrugs] = 0; DynamicFactions[factionid][fBank] = 0; rank = 1; format(string, sizeof(string), "Rank%d",rank); strmid(DynamicFactions[factionid][fRank1], string, 0, strlen(string), 255); rank ++; format(string, sizeof(string), "Rank%d",rank); strmid(DynamicFactions[factionid][fRank2], string, 0, strlen(string), 255); rank ++; format(string, sizeof(string), "Rank%d",rank); strmid(DynamicFactions[factionid][fRank3], string, 0, strlen(string), 255); rank ++; format(string, sizeof(string), "Rank%d",rank); strmid(DynamicFactions[factionid][fRank4], string, 0, strlen(string), 255); rank ++; format(string, sizeof(string), "Rank%d",rank); strmid(DynamicFactions[factionid][fRank5], string, 0, strlen(string), 255); rank ++; format(string, sizeof(string), "Rank%d",rank); strmid(DynamicFactions[factionid][fRank6], string, 0, strlen(string), 255); rank ++; format(string, sizeof(string), "Rank%d",rank); strmid(DynamicFactions[factionid][fRank7], string, 0, strlen(string), 255); rank ++; format(string, sizeof(string), "Rank%d",rank); strmid(DynamicFactions[factionid][fRank8], string, 0, strlen(string), 255); rank ++; format(string, sizeof(string), "Rank%d",rank); strmid(DynamicFactions[factionid][fRank9], string, 0, strlen(string), 255); rank ++; format(string, sizeof(string), "Rank%d",rank); strmid(DynamicFactions[factionid][fRank10], string, 0, strlen(string), 255); DynamicFactions[factionid][fSkin1] = 0; DynamicFactions[factionid][fSkin2] = 0; DynamicFactions[factionid][fSkin3] = 0; DynamicFactions[factionid][fSkin4] = 0; DynamicFactions[factionid][fSkin5] = 0; DynamicFactions[factionid][fSkin6] = 0; DynamicFactions[factionid][fSkin7] = 0; DynamicFactions[factionid][fSkin8] = 0; DynamicFactions[factionid][fSkin9] = 0; DynamicFactions[factionid][fSkin10] = 0; DynamicFactions[factionid][fJoinRank] = 0; DynamicFactions[factionid][fUseSkins] = 0; DynamicFactions[factionid][fType] = 0; DynamicFactions[factionid][fRankAmount] = 0; DynamicFactions[factionid][fMembers] = 0; DynamicFactions[factionid][SpawnWep1] = 0; DynamicFactions[factionid][SpawnWep2] = 0; DynamicFactions[factionid][fUseColor] = 0; DynamicFactions[factionid][fArmor] = 0; format(string, sizeof(string), "0xFFFFFFFF"); strmid(DynamicFactions[factionid][fColor], string, 0, strlen(string), 255); strmid(DynamicFactions[factionid][fColorName], "None", 0, strlen(string), 255); strmid(DynamicFactions[factionid][fOwnerName], "Nobody", 0, strlen(string), 255); format(string, sizeof(string), "» You have reset Family ID: %d.", factionid); SendClientMessage(playerid, COLOR_YELLOW, string); SaveDynamicFactions(); } else { SendClientMessage(playerid, COLOR_RED, "» Your not an administrator or an administrator with the required level."); } } return 1; }