Jump to content

Question

Posted

Salutare SA-MP.RO . Am incercat sa fac un script de newbiechat si nu stiu unde am gresit . Problema este ca el nu imi da nicio eroare ... Merge inchis / deschis dar cand scriu cu /n nu apare nimic .

[pawn]//----------------------------------[newbie chat]----------------------------------------

if(strcmp(cmd, "/newbie", true) == 0 || strcmp(cmd, "/n", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

        if(gPlayerLogged[playerid] == 0)

        {

            SendClientMessage(playerid, COLOR_GREY, "  You havent logged in yet !");

            return 1;

        }

if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)

{

SendClientMessage(playerid, COLOR_GRAD2, "  The OOC channel has been disabled by an Admin !");

return 1;

}

if(PlayerInfo[playerid][pMuted] == 1)

{

SendClientMessage(playerid, TEAM_CYAN_COLOR, "  You can't speak, you have been silenced !");

return 1;

}

GetPlayerName(playerid, sendername, sizeof(sendername));

new length = strlen(cmdtext);

while ((idx < length) && (cmdtext[idx] <= ' '))

{

idx++;

}

new offset = idx;

new result[64];

while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))

{

result[idx - offset] = cmdtext[idx];

idx++;

}

for(new i=0; i<MAX_PLAYERS; i++)

if(FindIP(result)) ///

{

  new advertiser[MAX_PLAYER_NAME];

  GetPlayerName(playerid, advertiser, sizeof(advertiser));

  format(string, sizeof(string), "[Warning]: %s[iD: %d] face reclama ",advertiser,i);

  ABroadCast(COLOR_LIGHTRED,string,1);

  return 0;

}

result[idx - offset] = EOS;

if(!strlen(result))

{

SendClientMessage(playerid, COLOR_GRAD2, "{55D4FF}SCRIE:{B4B4B4} (/n)ewbie [text]");

return 1;

}

if(PlayerInfo[playerid][pLevel] == 1)

format(string, sizeof(string), "{7F90E5}*(N) Incepator Nivel 1 - %s[%d]:{FFFFFF} %s",sendername, result);

            if(PlayerInfo[playerid][pLevel] == 2)

            format(string, sizeof(string), "{7F90E5}*(N) Incepator Nivel 2 - %s[%d]:{FFFFFF} %s",sendername, result);

            if(PlayerInfo[playerid][pLevel] == 3)

            format(string, sizeof(string), "{7F90E5}*(N) Incepator Nivel 3 - %s[%d]:{FFFFFF} %s",sendername, result);

            if(PlayerInfo[playerid][pAdmin] == 1)

            format(string, sizeof(string), "{7F90E5}*(N) Administrator Nivel 1 - %s[%d]:{FFFFFF} %s",sendername, result);

            if(PlayerInfo[playerid][pAdmin] == 2)

            format(string, sizeof(string), "{7F90E5}*(N) Administrator Nivel 2 - %s[%d]:{FFFFFF} %s",sendername, result);

}

return 1;

}

if(strcmp(cmd, "/non", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

if (PlayerInfo[playerid][pAdmin] >= 7 && (!noooc))

{

noooc = 1;

BroadCast(COLOR_GRAD2, "  Newbie chat channel disabled by an Admin !");

}

else if (PlayerInfo[playerid][pAdmin] >= 2 && (noooc))

{

noooc = 0;

BroadCast(COLOR_GRAD2, "  Newbie chat channel enabled by an Admin !");

}

else

{

SendClientMessage(playerid, COLOR_GRAD1, "  you are not authorized to use that command!");

}

}

return 1;

}[/pawn]

Te-am ajutat ? Dami un +1 si suntem chit :) !

3 answers to this question

Recommended Posts

Posted

[pawn]//----------------------------------[newbie chat]----------------------------------------

if(strcmp(cmd, "/newbie", true) == 0 || strcmp(cmd, "/n", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

        if(gPlayerLogged[playerid] == 0)

        {

            SendClientMessage(playerid, COLOR_GREY, "  You havent logged in yet !");

            return 1;

        }

if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)

{

SendClientMessage(playerid, COLOR_GRAD2, "  The OOC channel has been disabled by an Admin !");

return 1;

}

if(PlayerInfo[playerid][pMuted] == 1)

{

SendClientMessage(playerid, TEAM_CYAN_COLOR, "  You are not allowed to speak, you have been silenced !");

return 1;

}

GetPlayerName(playerid, sendername, sizeof(sendername));

new length = strlen(cmdtext);

while ((idx < length) && (cmdtext[idx] <= ' '))

{

idx++;

}

new offset = idx;

new result[64];

while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))

{

result[idx - offset] = cmdtext[idx];

idx++;

}

for(new i=0; i<MAX_PLAYERS; i++)

{

if(FindIP(result)) ///

{

  new advertiser[MAX_PLAYER_NAME];

  GetPlayerName(playerid, advertiser, sizeof(advertiser));

  format(string, sizeof(string), "[Warning]: %s[iD: %d] face reclama ",advertiser,i);

  ABroadCast(COLOR_LIGHTRED,string,1);

  return 0;

}

result[idx - offset] = EOS;

if(!strlen(result))

{

SendClientMessage(playerid, COLOR_GRAD2, "{55D4FF}SCRIE:{B4B4B4} (/n)ewbie [text]");

return 1;

}

if(PlayerInfo[playerid][pLevel] == 1)

{

format(string, sizeof(string), "{7F90E5}*(N) Incepator Nivel 1 - %s[%d]:{FFFFFF} %s",sendername, result);

SendClientMessageToAll(0xFFFFFF

}

  if(PlayerInfo[playerid][pLevel] == 2)

  {

            format(string, sizeof(string), "{7F90E5}*(N) Incepator Nivel 2 - %s[%d]:{FFFFFF} %s",sendername, result);

}

        if(PlayerInfo[playerid][pLevel] == 3)

        {

            format(string, sizeof(string), "{7F90E5}*(N) Incepator Nivel 3 - %s[%d]:{FFFFFF} %s",sendername, result);

}

        if(PlayerInfo[playerid][pAdmin] == 1)

        {

            format(string, sizeof(string), "{7F90E5}*(N) Administrator Nivel 1 - %s[%d]:{FFFFFF} %s",sendername, result);

}

        if(PlayerInfo[playerid][pAdmin] == 2)

        {

            format(string, sizeof(string), "{7F90E5}*(N) Administrator Nivel 2 - %s[%d]:{FFFFFF} %s",sendername, result);

}

for(new i=0; i<MAX_PLAYERS; i++)

{

SendClientMessage(i, -1, string);

}

}

return 1;

}[/pawn]

Posted

[pawn]C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(62) : warning 201: redefinition of constant/macro (symbol "COLOR_RED")

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3028) : error 004: function "GivePlayerCash" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3057) : error 004: function "GivePlayerCash" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3093) : error 004: function "SafeResetPlayerWeapons" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3094) : error 004: function "SafeGivePlayerWeapon" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3121) : error 004: function "SafeResetPlayerWeapons" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3633) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3645) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3657) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3669) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3673) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3685) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3689) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3693) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3697) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3701) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3705) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3709) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3713) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3725) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3729) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3733) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3737) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3741) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3753) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3757) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Stefan\Desktop\PGRPG\GM\gamemodes\PG6.pwn(3761) : error 004: function "PlayerToPoint" is not implemented

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

26 Errors.[/pawn]

Te-am ajutat ? Dami un +1 si suntem chit :) !

Posted

Erorile astea nu sunt de la comanda ci de la faptul ca nu ai PlayerToPoint:

[pawn]stock PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)

{

    if(IsPlayerConnected(playerid)){

    new Float:oldposx, Float:oldposy, Float:oldposz;

    new Float:tempposx, Float:tempposy, Float:tempposz;

    GetPlayerPos(playerid, oldposx, oldposy, oldposz);

    tempposx = (oldposx -x);

    tempposy = (oldposy -y);

    tempposz = (oldposz -z);

    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))){

    return 1;}}

    return 0;

}[/pawn]

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.