SA-MP Forums Archive
Converting ! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Converting ! (/showthread.php?tid=382481)



Converting ! - Red_Dragon. - 03.10.2012

pawn Код:
public OnPlayerCommandText(playerid, cmdtext)
{
    if(!strcmp("/carwash", cmdtext, true))
    {
        if(IsPlayerInRangeOfPoint(playerid, 1084227584, 1156507145, 3302951282, 1095845911))
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                if(GetPlayerState(playerid) == 2)
                {
                    new var0 = 0;
                    while(++var0 < 89)
                    {
                        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == glob2C[var0][0])
                        {
                            SendClientMessage(playerid, 0xAA3333AA, "You cannot have this vehicle washed.");
                            return 1;
                        }
I need this to be ZCMD instead of STRCMP if any one can do it and thanks


Re: Converting ! - dannyk0ed - 03.10.2012

pawn Код:
CMD:carwash(playerid, parmas[])
    {
        if(IsPlayerInRangeOfPoint(playerid, 1084227584, 1156507145, 3302951282, 1095845911))
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                if(GetPlayerState(playerid) == 2)
                {
                    new var0 = 0;
                    while(++var0 < 89)
                    {
                        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == glob2C[var0][0])
                        {
                            SendClientMessage(playerid, 0xAA3333AA, "You cannot have this vehicle washed.");
                            return 1;
                        }



Re: Converting ! - CaRa - 03.10.2012

Код:
CMD:carwash(playerid, params [])
{
        if(IsPlayerInRangeOfPoint(playerid, 1084227584, 1156507145, 3302951282, 1095845911))
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                if(GetPlayerState(playerid) == 2)
                {
                    new var0 = 0;
                    while(++var0 < 89)
                    {
                        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == glob2C[var0][0])
                        {
                            SendClientMessage(playerid, 0xAA3333AA, "You cannot have this vehicle washed.");
                            return 1;
                        }
                    }
                }
            }
        }
        return 1;
}



Re: Converting ! - Red_Dragon. - 03.10.2012

Now i have these errors:
pawn Код:
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(141) : error 035: argument type mismatch (argument 1)
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(141) : warning 213: tag mismatch
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(151) : warning 213: tag mismatch
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(176) : warning 213: tag mismatch
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(176) : error 035: argument type mismatch (argument 3)
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(187) : warning 213: tag mismatch
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(187) : error 035: argument type mismatch (argument 3)
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(192) : error 010: invalid function or declaration
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(389) : warning 213: tag mismatch
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(389) : error 035: argument type mismatch (argument 3)
E:\Express Gaming Roleplay Server - Copy\filterscripts\carwash.pwn(393) : warning 203: symbol is never used: "carwash"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.



Re: Converting ! - CaRa - 03.10.2012

Quote:
Originally Posted by CaRa
Посмотреть сообщение
Код:
CMD:carwash(playerid, params [])
{
        if(IsPlayerInRangeOfPoint(playerid, 1084227584, 1156507145, 3302951282, 1095845911))
        {
            if(IsPlayerInAnyVehicle(playerid))
            {
                if(GetPlayerState(playerid) == 2)
                {
                    new var0 = 0;
                    while(++var0 < 89)
                    {
                        if(GetVehicleModel(GetPlayerVehicleID(playerid)) == glob2C[var0][0])
                        {
                            SendClientMessage(playerid, 0xAA3333AA, "You cannot have this vehicle washed.");
                            return 1;
                        }
                    }
                }
            }
        }
        return 1;
}
Put this command where you want in your gamemode not in Onplayercommandtext.


Re: Converting ! - SA-MPDrifter - 03.10.2012

Place it outside any callback.


Re: Converting ! - Red_Dragon. - 03.10.2012

But i want it in an FS so i want it under OnPlayerCommandText i do not want it in my GM is that possible ?


Re: Converting ! - Ghost_Boii - 03.10.2012

We Can make it as FS but better add it in the gamemode


Re: Converting ! - Red_Dragon. - 03.10.2012

So ?!?!? i just need it in an FS because not only this command is in the FS so if i wanted it to be in the GM i will do many things


Re: Converting ! - Ghost_Boii - 03.10.2012

Man don't add under onplayercommandtext
Because it is ZCMD