if(User[playerid][accountAdmin] >= 0) { playermembers[playerid] = CreateDynamic3DTextLabel("", -1, 0.0, 0.0, -0.9, 20, playerid, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); } if(User[playerid][accountAdmin] >= 1) { moderator[playerid] = CreateDynamic3DTextLabel("{87A3AE}Moderator", -1, 0.0, 0.0, -0.9, 20, playerid, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); } if(User[playerid][accountAdmin] >= 2) { administrator[playerid] = CreateDynamic3DTextLabel("{87A3AE}Administrator", -1, 0.0, 0.0, -0.9, 20, playerid, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); } if(User[playerid][accountAdmin] >= 3) { leadadministrator[playerid] = CreateDynamic3DTextLabel("{87A3AE}Lead Administrator", -1, 0.0, 0.0, -0.9, 20, playerid, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); } if(User[playerid][accountAdmin] >= 4) { headadministrator[playerid] = CreateDynamic3DTextLabel("{87A3AE}Head Administrator", -1, 0.0, 0.0, -0.9, 20, playerid, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); } if(User[playerid][accountAdmin] >= 5) { serverowner[playerid] = CreateDynamic3DTextLabel("{87A3AE}Server Developer", -1, 0.0, 0.0, -0.9, 20, playerid, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); } |
if (User[playerid][accountAdmin] >= 1) { PlayerLabel[playerid] = CreateDynamic3DTextLabel("", -1, 0.0, 0.0, -0.9, 20, playerid, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0); switch (User[playerid][accountAdmin]) { case 1: UpdateDynamic3DTextLabelText(PlayerLabel[playerid], 0x87A3AEFF, "Moderator"); case 2: UpdateDynamic3DTextLabelText(PlayerLabel[playerid], 0x87A3AEFF, "Administrator"); case 3: UpdateDynamic3DTextLabelText(PlayerLabel[playerid], 0x87A3AEFF, "Lead Administrator"); case 4: UpdateDynamic3DTextLabelText(PlayerLabel[playerid], 0x87A3AEFF, "Head Administrator"); case 5: UpdateDynamic3DTextLabelText(PlayerLabel[playerid], 0x87A3AEFF, "Server Developer"); } } SetPlayerHealth(playerid, 100.0); SetPlayerArmour(playerid, 100.0);
Код:
if (User[playerid][accountAdmin] >= 1) { PlayerLabel[playerid] = CreateDynamic3DTextLabel("", -1, 0.0, 0.0, -0.9, 20, playerid, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0); switch (User[playerid][accountAdmin]) { case 1: UpdateDynamic3DTextLabelText(PlayerLabel[playerid], 0x87A3AEFF, "Moderator"); case 2: UpdateDynamic3DTextLabelText(PlayerLabel[playerid], 0x87A3AEFF, "Administrator"); case 3: UpdateDynamic3DTextLabelText(PlayerLabel[playerid], 0x87A3AEFF, "Lead Administrator"); case 4: UpdateDynamic3DTextLabelText(PlayerLabel[playerid], 0x87A3AEFF, "Head Administrator"); case 5: UpdateDynamic3DTextLabelText(PlayerLabel[playerid], 0x87A3AEFF, "Server Developer"); } } SetPlayerHealth(playerid, 100.0); SetPlayerArmour(playerid, 100.0); |
As you can see, you copied/pasted your code without adding intendation. Fixe it and try again.
|
if (User[playerid][accountAdmin] >= 1)
{
PlayerLabel[playerid] = CreateDynamic3DTextLabel("", -1, 0.0, 0.0, -0.9, 20, playerid, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0);
switch (User[playerid][accountAdmin])
{
case 1: UpdateDynamic3DTextLabelText(PlayerLabel[playerid], 0x87A3AEFF, "Moderator");
case 2: UpdateDynamic3DTextLabelText(PlayerLabel[playerid], 0x87A3AEFF, "Administrator");
case 3: UpdateDynamic3DTextLabelText(PlayerLabel[playerid], 0x87A3AEFF, "Lead Administrator");
case 4: UpdateDynamic3DTextLabelText(PlayerLabel[playerid], 0x87A3AEFF, "Head Administrator");
case 5: UpdateDynamic3DTextLabelText(PlayerLabel[playerid], 0x87A3AEFF, "Server Developer");
}
}
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 100.0);