Salut , j'ai un soucis avec le /+force du rp de @lex , enfaite , quand je le fais , sa me dit un truck mais je sais plus trop , on peut pas le porter en étant admin flag z , même en étant policier et flag z , sans flag z sa marche mais avec le flag z sa marche pas , j'avais le code pour reparer sa , mais je les perdu :c Je vous donne le code en question , qui et bugué :
Merci , Amicalement.
Code PHP:
public Action:Command_Grab(client, args)
{
if (!IsPlayerAlive(client) || !IsClientInGame(client) || (client < 0) || (client > MaxClients))
return Plugin_Handled;
if (g_IsInJail[client] == 0)
{
if (grab[client])
{
gObj[client] = -1;
grab[client] = false;
return Plugin_Handled;
}
new ent = TraceToEntity(client);
new String:edictname[128];
GetEdictClassname(ent, edictname, 128);
if (gObj[client] == ent)
{
if (grab[client])
{
gObj[client] = -1;
grab[client] = false;
}
else
{
CPrintToChat(client, "%s {red} Vous ne portez rien actuellement !", LOGO);
}
return Plugin_Handled;
}
else
{
if (!grab[client])
{
if (StrEqual(edictname, "prop_physics"))
{
new String:Name[200];
Entity_GetName(ent, Name, sizeof(Name));
if(StrContains(Name, "propolice_", true) != -1)
{
if (GetClientTeam(client) == 3)
{
gObj[client] = ent;
grab[client] = true;
}
else
{
CPrintToChat(client, "%s {red} Ce prop appartient à la police - {black}Cordialement", LOGO);
}
}
else
{
gObj[client] = ent;
grab[client] = true;
}
}
else if(StrEqual(edictname, "player"))
{
new String:SteamID[64];
GetClientAuthString(ent, SteamID, sizeof(SteamID));
if (Chef_SERVEUR(client))
{
CPrintToChat(client, "%s {red}Cette homme est trop puissant désolé !", LOGO);
return Plugin_Handled;
}
else
{
if ((GetClientTeam(client) == 3) || jobid[client] > 0)
{
if (GetClientTeam(ent) == 3 && GetClientTeam(client) == 2)
{
new String:SteamID2[64];
GetClientAuthString(client, SteamID2, sizeof(SteamID2));
if (Chef_SERVEUR(client))
{
gObj[client] = ent;
grab[client] = true;
}
}