07.06.2014, 21:22
Hi guys im having trouble making a Attach3DTextLabelToPlayer. i need it for when my admins log in so it follows them saying Admin on duty/n Do Not Shoot
public OnPlayerSpawn(playerid)
{
if(pInfo[playerid][Admin] > 0) //Change this to your admin variable!
{
new Text3D:label = Create3DTextLabel("Admin on duty/n Do Not Shoot", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
}
return 1;
}
new Text3D:label[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
if(pInfo[playerid][Admin] > 0) //Change this to your admin variable!
{
label[playerid] = Create3DTextLabel("Admin on duty/n Do Not Shoot", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
}
return 1;
}
//Source: SilentSoul
public OnPlayerDisconnect(playerid, reason)
{
Delete3DTextLabel(label[playerid]);
//Rest of code..
return 1;
}
public OnPlayerSpawn(playerid)
{
if(aDuty[playerid]) // checks if an admin is onduty then adds the label. ( change it to your own variable )
{
if(pInfo[playerid][Admin] > 0) //Change this to your admin variable!
{
new Text3D:label = Create3DTextLabel("Admin on duty/n Do Not Shoot", 0x008080FF, 30.0, 40.0, 50.0, 40.0, 0);
Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.7);
}
}
return 1;
}