Hey,
ich habe ein Problem, undzwar wenn ein spieler Spawnt (z.B. Hitman) dann spawn der da wo ein Zivi Spawnt...
Hier 3 vllt dazu führende sachen:
if(IsPlayerHitman(playerid))
{
SetPlayerPos(playerid,949.4664,2143.8638,1011.0204);
SetPlayerInterior(playerid,1);
SetPlayerVirtualWorld(playerid,0);
SetPlayerFacingAngle(playerid,92.3189);
}
if(strcmp(strget(cmdtext,0),"/makeleader",true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
if(!strlen(strget(cmdtext,1)) || !strlen(strget(cmdtext,2)))
{
SendClientMessage(playerid,COLOR_WHITE,"SERVER: /makealeader [ID] [Frakid]");
}
else
{
new newadmin = strval(strget(cmdtext,1));
new adminlvl = strval(strget(cmdtext,2));
new hisname[MAX_PLAYER_NAME];
new meinname[MAX_PLAYER_NAME];
GetPlayerName(playerid,meinname,sizeof(meinname));
GetPlayerName(newadmin,hisname,sizeof(hisname));
PlayerInfo[newadmin][pFraktion] = adminlvl;
PlayerInfo[newadmin][pRank] = 12;
new msg[128];
format(msg,sizeof(msg),"Du wurdest von %s zum Leader von %s befˆrdert!", meinname, PlayerInfo[newadmin][pFraktion]);
SendClientMessage(newadmin,COLOR_LIGHTBLUE,msg);
format(msg,sizeof(msg),"Du hast %s zum Leader von %s befˆrdert!", hisname, PlayerInfo[newadmin][pFraktion]);
SendClientMessage(playerid,COLOR_LIGHTBLUE,msg);
}
}
else
{
SendClientMessage(playerid,COLOR_WHITE,"SERVER: Du bist kein Admin");
}
}
public IsPlayerHitman(playerid)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pFraktion] == 6)
{
return 1;
}
}
return 0;
}
Und noch ein bug in einem Cmd:
Undzwar soll der cmd einen zwischen 2 posis porten(Wenn der spieler hitmen is)
Doch wenn ich den eingebe, geht nix...
if(strcmp("/hitmen", cmdtext,true) ==0)
{
if(IsPlayerHitman(playerid))
{
if(IsPlayerInRangeOfPoint(playerid,2486.9426,2772.8196,10.7782,7.0))
{
SetPlayerPos(playerid,2502.5134,2773.1450,10.8203);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
}
else if(IsPlayerInRangeOfPoint(playerid,2502.5134,2773.1450,10.8203,7.0))
{
SetPlayerPos(playerid,2486.9426,2772.8196,10.7782);
SetPlayerVirtualWorld(playerid,0);
SetPlayerInterior(playerid,0);
}
}
else
{
GameTextForPlayer(playerid,"Zutritt verwehrt",3000,1);
}
return 1;
}
Hoffe ihr könnt helfen !
MfG
melle