CMD:skuj(playerid, cmdtext[])
{
new playerid2;
new f=PlayerInfo[playerid][pFrakcja];
if(!ToFrakcja(playerid,f)) return 1;
if(FrakcjaInfo[f][fTyp]!=1) return 1;
if(sscanf(cmdtext, "i", playerid2))
{
GuiInfo(playerid,""BIALY"U?yj: "MAPA"/skuj (id)");
return 1;
}
if(playerid == playerid2)
{
GuiInfo(playerid,"Nie mo?esz zakuwa? samego siebie.");
return 1;
}
if(!IsPlayerConnected(playerid2))
{
GuiInfo(playerid,"Gracz nie jest zalogowany.");
return 1;
}
if(!OdlegloscGracze(5.0, playerid, playerid2))
{
GuiInfo(playerid,"Gracz nie jest ko?o ciebie!");
return 1;
}
if(KogoZakul[playerid2] != -1)
{
KogoZakul[playerid2] = -1;
SendClientMessageFormat(playerid, 0xffffff00, "Odku?e? gracza %s.", Nick[playerid2]);
format(String, sizeof(String),"*%s rozku? %s.",Nick[playerid], Nick[playerid2]);
WyswietlText(playerid,KOLOR_JA,10.0,String);
SetPlayerSpecialAction(playerid2,SPECIAL_ACTION_NONE);
}
else
{
KogoZakul[playerid2] = playerid;
SendClientMessageFormat(playerid, 0xffffff00, "Zaku?e? gracza %s.", Nick[playerid2]);
format(String, sizeof(String),"*%s sku? %s.",Nick[playerid], Nick[playerid2]);
WyswietlText(playerid,KOLOR_JA,10.0,String);
}
return 1;
}