[Pomoc]Dcmd,strcmp

Započeo ...Nikola..., Jul 03, 2011, 17:41:55 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: FactionGame
Detaljan opis problema: da li mozete ove dcmd komande da prebacite u strcmp
Dio skripte: //---------------------------[DCMD Commands!!]--------------------------------------------
dcmd_specplayer(playerid, params[])
{
new Giveplayerid, Name[256], String[256], Name2[256];
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameMaster] >= 1)
{
if (sscanf(params, "d", Giveplayerid)) SendClientMessage(playerid,COLOR_WHITE, "Koristi: /specplayer [Playerid]");
else if (!IsPlayerConnected(Giveplayerid)) SendClientMessage(playerid,COLOR_PURPLE,"Player not connected?");
else
{
if ( Specing[Giveplayerid] == 1 )
{
SendClientMessage(playerid, COLOR_RED, "   The person you have tried to spec is spectating someone else.");
}
else
{
    GetPlayerName(playerid, Name, 256);
GetPlayerName(Giveplayerid, Name2, 256);
format(String, 256, "[%i] %s is now spectating [%i] %s",playerid, Name,Giveplayerid, Name2);
CallLocalFunction("ircRemoteSay", "iss", 1, "#FSE", String);
Specing[playerid] = 1;
}
if ( !IsPlayerInAnyVehicle(Giveplayerid) )
{
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, Giveplayerid);
SetPlayerInterior(playerid,GetPlayerInterior(Giveplayerid));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(Giveplayerid));
return 1;
}
else
{
TogglePlayerSpectating(playerid, 1);
PlayerSpectateVehicle(playerid, GetPlayerVehicleID(Giveplayerid));
SetPlayerInterior(playerid,GetPlayerInterior(Giveplayerid));
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(Giveplayerid));
return 1;
}
}
}
return 1;
}

dcmd_specoff(playerid, params[])
{
#pragma unused params
TogglePlayerSpectating(playerid, 0);
SetTimerEx("PosAfterSpec",3000,0,"d",playerid);
if (PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pGameMaster] >= 1)
{
    if(Specing[playerid] != 0)
    {
    Specing[playerid] = 0;
GivePlayerMoney(playerid,100)
}
else
{
SendClientMessage(playerid,COLOR_WHITE,"Trenutno nikoga ne specujete");
}
}
  else
  {
SendClientMessage(playerid, COLOR_WHITE, "(greska) Niste autorizovani da koristite ovu komandu!");
}
return 1;
}
//warn cmd
dcmd_warn(playerid,params[]) {
    if(PlayerInfo[playerid][pAdmin] >= 1) {
    new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
    if(!strlen(tmp) || !strlen(tmp2)) return SendClientMessage(playerid, COLOR_RED, "Koristi: /warn [playerid] [reason]");
    new warned = strval(tmp), str[128];
    new sendername[MAX_PLAYER_NAME];
    new giveplayer[MAX_PLAYER_NAME];
if(IsPlayerConnected(warned) && warned != INVALID_PLAYER_ID) {
    if(warned != playerid) {
    ABroadCast(warned,"WARN",1);
PlayerInfo[warned][pWarns]++;
if( PlayerInfo[warned][pWarns] == MAX_WARNINGS) {
GetPlayerName(warned, sendername, sizeof(sendername));
format(str, sizeof (str), "|A| \"%s\" je banovan zbog upozorenja \"%s\".(Razlog: %s) (Upozorenja: %d/5)",sendername, params[1+strlen(tmp)], PlayerInfo[warned][pWarns]);
SendClientMessageToAll(COLOR_RED, str);
BanLog(str);
Ban(warned);
return PlayerInfo[warned][pWarns] = 0;
} else {
GetPlayerName(warned, sendername, sizeof(sendername));
GetPlayerName(playerid, giveplayer, sizeof(giveplayer));
format(str, sizeof (str), "|A| \"%s\" je dao \"%s\" upozorenje.(Razlog: %s) (Upozorenja: %d/5)***",giveplayer,sendername, params[1+strlen(tmp)], PlayerInfo[warned][pWarns]);
return SendClientMessageToAll(COLOR_RED, str);
}
} else return SendClientMessage(playerid, COLOR_RED, "Nemozes dati upozorenje sebi");
} else return SendClientMessage(playerid, COLOR_RED, "Igrac je offline");
} else return SendClientMessage(playerid,COLOR_RED,"(greska) Niste autorizovani da koristite ovu komandu!");
}

Neke slike/video za lakse dobivanje pomoci(neobavezno): /

Ovo kao kad bi ja tebi dao GF mod i rekao ti da napravis GM kao LI...
Malo trazi, eksperimentisi a ne "U jbt ja ovo neznam, dam ja to balkancima da mi naprave"  :-\