Szia!Egy elég bonyolult megoldás, de:
Mód elejére:
[pawn]
new pirosdefine;
new feherdefine;
forward piros(playerid);
forward feher(playerid);
[/pawn]
Bárhova:
[pawn]
public piros(playerid)
{
pirosdefine = SetTimerEx(\"feher\",1000,false,\"i\",playerid);
SetPlayerColor(playerid,0xff0000AA);
return 1;
}
public feher(playerid)
{
feherdefine = SetTimerEx(\"piros\",1000,false,\"i\",playerid);
SetPlayerColor(playerid,0xffffffAA);
return 1;
}
[/pawn]
public OnPlayerDeath(playerid, killerid, reason)
[pawn]public OnPlayerDeath(playerid, killerid, reason)
{
KillTimer(pirosdefine);
KillTimer(feherdefine);
return 1;
}
[/pawn]
És 2 parancs(ZCMD):
[pawn]
CMD:koroz(playerid, params[])
{
new giveplayerid;
if(sscanf(params, \"u\", giveplayerid)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /korozes [playerid]\");
if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, \"Hiba: Nincs ilyen játékos!\");
if(IsPlayerLadmin(playerid))
{
SetTimerEx(\"piros\",1000,false,\"i\",giveplayerid);
}
else
{
SendClientMessage(playerid, hiba, \"Nem vagy rendõr!\");
}
return 1;
}
CMD:korozeski(playerid, params[])
{
new giveplayerid;
if(sscanf(params, \"u\", giveplayerid)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /korozeski [playerid]\");
if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, \"Hiba: Nincs ilyen játékos!\");
if(IsPlayerLadmin(playerid))
{
KillTimer(pirosdefine);
KillTimer(feherdefine);
}
else
{
SendClientMessage(playerid, hiba, \"Nem vagy rendõr!\");
}
return 1;
}
[/pawn]
Ha nem jó, szólj, neten írtam!