warum geht der befehl nicht???
ocmd:wanted(playerid,params[])
{
if(GetPVarInt(playerid,"Fraktion")==1)
{
new pID,wantedlevel,reason[128];
if(sscanf(params,"uds",pID,wantedlevel,reason))return SendClientMessage(playerid,Rot,"/wanted (ID) (Level) (Grund)");
SetPlayerWantedLevel(pID,wantedlevel);
new string[64];
format(string,sizeof(string),"Beampter: %s hat dir %i Wanteds gegeben, Grund:%d",playerid,wantedlevel,reason);
SendClientMessage(pID,Gelb,string);
}
else if(GetPVarInt(playerid,"Fraktion")==3)
{
new pID,wantedlevel,reason[128];
if(sscanf(params,"uds",pID,wantedlevel,reason))return SendClientMessage(playerid,Rot,"/wanted (ID) (Level) (Grund)");
SetPlayerWantedLevel(pID,wantedlevel);
new string[64];
format(string,sizeof(string),"Beampter:%s hat dir %i Wanteds gegeben, Grund:%d",playerid,wantedlevel,reason);
SendClientMessage(pID,Gelb,string);
}
return 1;
}
/wanted befehl geht nicht
- bombom48
- Geschlossen
- Erledigt
-
-
gibt es Fehler ?
Warnings oder so ?PS: man schreibt es Beamter und nicht Beampter
MfG. BeHapper -
Is schon egal habe mir überlegt keinen wantedkatalog zu machen..
Habe den befehl jetzt so:
ocmd:wanted(playerid,params[])
{
if(GetPVarInt(playerid,"Fraktion")==1)
{
new pID,reason[128];
if(sscanf(params,"ds",pID,reason))return SendClientMessage(playerid,Rot,"/wanted (ID) (Grund)");
SetPVarInt(pID,"Wantedlevel",GetPlayerWantedLevel(playerid));
SetPlayerWantedLevel(pID,GetPVarInt(pID,"Wantedlevel")+1);
new string[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string,sizeof(string),"Du hast ein Verbrechen begangen(%s), Reporter: %s",reason, name);
SendClientMessage(pID,Gelb,string);
}
else if(GetPVarInt(playerid,"Fraktion")==3)
{
new pID,reason[128];
if(sscanf(params,"ds",pID,reason))return SendClientMessage(playerid,Rot,"/wanted (ID) (Grund)");
SetPVarInt(pID,"Wantedlevel",GetPlayerWantedLevel(playerid));
SetPlayerWantedLevel(pID,GetPVarInt(pID,"Wantedlevel")+1);
new string[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string,sizeof(string),"Du hast ein Verbrechen begangen(%s), Reporter: %s",reason, name);
SendClientMessage(pID,Gelb,string);
}
return 1;
} -
-
ocmd:wanted(playerid,params[])
{
if(GetPVarInt(playerid,"Fraktion")==1 || GetPVarInt(playerid,"Fraktion")==3)
{
new pID,reason[128];
if(sscanf(params,"us",pID,reason))return SendClientMessage(playerid,Rot,"/wanted (ID) (Grund)");
SetPlayerWantedLevel(pID,GetPVarInt(pID,"Wantedlevel")+1);
SetPVarInt(pID,"Wantedlevel",GetPlayerWantedLevel(playerid));
new string[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string,sizeof(string),"Du hast ein Verbrechen begangen(%s), Reporter: %s",reason, name);
SendClientMessage(pID,Gelb,string);
}
return 1;
} -
breadfish.de
Hat das Thema geschlossen.