CMD:mask(playerid, params[])
{
if(class[playerid][Sniper] == 1)
{
SetPlayerAttachedObject(playerid, 1, 19037, 2, 10, 4.7, 0.0, 90, 90, 0);
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 0); // ShowPlayerNameTagForPlayer(i, playerid, 0) hide name for all players
SetPlayerMarkerForPlayer(i,playerid,0);
}
}
if(class[playerid][Sniper] == 0)
{
SendClientMessage(playerid, COLOR_RED,"You Need to be in Sniper Class to Use this command");
}
return 1;
}
CMD:mask(playerid, params[])
{
new name[MAX_PLAYER_NAME];
new string[42];
if(class[playerid][Sniper] == 1) return SendClientMessage(playerid, COLOR_GREY, "You're not Sniper Man.");
if(PlayerInfo[playerid][pSniper] == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(i, playerid, 0);
}
}
PlayerInfo[playerid][Sniper] = 1;
GetPlayerName(playerid, name, sizeof(name));
}
else if(PlayerInfo[playerid][Sniper] == 1)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(i, playerid, 1);
format(string, 128, "Stranger [ID: %i]", var);
}
}
PlayerInfo[playerid][Sniper] = 0;
GetPlayerName(playerid, name, sizeof(name));
}
else if(GetPVarInt(playerid, "EventToken"))
{
SendClientMessageEx(playerid, COLOR_GRAD1, "You can't use this while in an event.");
}
else if(class[playerid][Sniper] == 0)
{
SendClientMessage(playerid, COLOR_RED,"You Need to be in Sniper Class to Use this command");
}
return 1;
}
|
Use SetPlayerAttachedObject pawn Код:
|
|
@^, don't see the SetPlayerAttachedObject, please add this code to have the hockey mask (Red) attached to the face!
|