Ich hab was ausprobiert und zwar den Spieler in den Knast zu stecken aber es klappt nicht so:
Codes
public OnPlayerDeath(playerid, killerid, reason)
{
if(sInfo[killerid][fraktion]==1)
{
if(sInfo[playerid][wanted] > 0)
{
new string[128];
format(string,sizeof string,"** Officer %s hat den Verbrecher %s erschossen. **",SpielerName(killerid),SpielerName(playerid));
SendClientMessageToAll(ROT,string);
new getwanted=sInfo[playerid][wanted];
sInfo[playerid][knastzeit]=getwanted*7;
sInfo[playerid][wanted]=0;
}
}
else if(sInfo[killerid][fraktion]!=1)
{
new string[128];
IsDeath[playerid] = true;
GetPlayerPos(playerid, DeathPos[playerid][0], DeathPos[playerid][1], DeathPos[playerid][2]);
toticon[playerid] = CreatePickup(1254, 1, DeathPos[playerid][0], DeathPos[playerid][1], DeathPos[playerid][2], -1);
format(string,sizeof string,"%s wurde von %s gekillt.",SpielerName(playerid),SpielerName(killerid));
tottext[playerid]=Create3DTextLabel(string, ROT, DeathPos[playerid][0], DeathPos[playerid][1], DeathPos[playerid][2], 40.0, 0, 0);
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(sInfo[playerid][knastzeit] > 0)
{
SetPlayerPos(playerid,198.2615814209, 162.50315856934, 1006);
SetPlayerInterior(playerid,6);
SetCameraBehindPlayer(playerid);
SetTimerEx("Knastzeit",sInfo[playerid][knastzeit],false,"i",playerid);
}
else if(sInfo[playerid][knastzeit] <=0)
{
if(IsDeath[playerid] == true)
{
SetPlayerSkin(playerid,sInfo[playerid][skin]);
SetPlayerPos(playerid, DeathPos[playerid][0], DeathPos[playerid][1], DeathPos[playerid][2]);
ApplyAnimation(playerid, "CRACK", "crckdeth2",4.0,1,1,1,1,0,0);
//TogglePlayerControllable(playerid, 0);
SetTimerEx("nachTot",300000,false,"i",playerid);
}
else if(IsDeath[playerid] == false)
{
if(!isPlayerInFrakt(playerid,0))
{
new fID = sInfo[playerid][fraktion];
SetPlayerPos(playerid, fInfo[fID][f_x],fInfo[fID][f_y],fInfo[fID][f_z]);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,fInfo[fID][f_inter]);
SetPlayerSkin(playerid,sInfo[playerid][skin]);
}
else if(isPlayerInFrakt(playerid,0))
{
SetPlayerPos(playerid,zivispawn);
SetCameraBehindPlayer(playerid);
SetPlayerInterior(playerid,0);
SetPlayerSkin(playerid,sInfo[playerid][skin]);
}
}
}
StopAudioStreamForPlayer(playerid);
return 1;
}
2.Problem ich hab in der Log ganze zeit so eine Naricht
[22:38:58] sscanf warning: Strings without a length are deprecated, please add a destination size.
[22:41:29] sscanf warning: Strings without a length are deprecated, please add a destination size.
[22:41:34] sscanf warning: Strings without a length are deprecated, please add a destination size.
[22:41:37] sscanf warning: Strings without a length are deprecated, please add a destination size.
[22:42:35] sscanf warning: Strings without a length are deprecated, please add a destination size.
[22:42:59] [warning] client exceeded 'ackslimit' 25.134.181.65:63986 (5117) Limit: 3000/sec
[22:43:03] [warning] client exceeded 'ackslimit' 25.104.237.69:52782 (5117) Limit: 3000/sec
Kann man beide Sachen irgendwie beheben?