SA-MP Forums Archive
[Pedido] /trancar para carros - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] /trancar para carros (/showthread.php?tid=375724)



/trancar para carros - Lucas-Fc - 07.09.2012

Alguйm posta ?


Re: /trancar para carros - Diogo123 - 07.09.2012

ZCMD :
pawn Код:
CMD:trancar(playerid, params[])
{
    if (GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1, "Seu carro estб seguro!");
    new vehicleid = GetPlayerVehicleID(playerid);
    for (new i = 0; i <= MAX_PLAYERS; i++)
    {
        if (i != playerid)
        {
            SetVehicleParamsForPlayer(vehicleid, i, 0, 1);
            GameTextForPlayer(playerid, "~w~ Veiculo ~r~trancado!", 1000, 1);
        }
    }
    return 1;
}
STRCMP

if (strcmp("/trancar", cmdtext, true, 10) == 0)
{
if (GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1, "Seu carro estб seguro!");
new vehicleid = GetPlayerVehicleID(playerid);
for (new i = 0; i <= MAX_PLAYERS; i++)
{
if (i != playerid)
{
SetVehicleParamsForPlayer(vehicleid, i, 0, 1);
GameTextForPlayer(playerid, "~w~ Veiculo ~r~trancado!", 1000, 1);
}
}
return 1;
}



Re: /trancar para carros - Lucas-Fc - 07.09.2012

o que seria STRCMP ?


Re: /trancar para carros - Diogo123 - 07.09.2012

O.o na public OnPlayerCommandText vocк coloca :
pawn Код:
if (strcmp("/trancar", cmdtext, true, 10) == 0)
{
if (GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, -1, "Seu carro estб seguro!");
new vehicleid = GetPlayerVehicleID(playerid);
for (new i = 0; i <= MAX_PLAYERS; i++)
{
if (i != playerid)
{
SetVehicleParamsForPlayer(vehicleid, i, 0, 1);
GameTextForPlayer(playerid, "~w~ Veiculo ~r~trancado!", 1000, 1);
}
}
return 1;
}



Re: /trancar para carros - Lucas-Fc - 07.09.2012

Sу isso ? Oo


Re: /trancar para carros - Lucas-Fc - 08.09.2012

Nгo funciona, aparece veiculo trancado e talz , mais da pra entrar no carro numa boa

aff


Re: /trancar para carros - Maklister - 08.09.2012

pawn Код:
CMD:trancar(playerid)
{
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "[x] Vocк nгo estб em um veнculo.");
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if(i == playerid) continue;
        SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), i, 0, 1);
    }
    SendClientMessage(playerid, -1, "Veнculo trancado!");
    return 1;
}



Re: /trancar para carros - Lucas-Fc - 08.09.2012

n entendi cara , como eu boto /\ ?


Re: /trancar para carros - Diogo123 - 08.09.2012

pawn Код:
if (strcmp("/trancar", cmdtext, true, 10) == 0)
{
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "[x] Vocк nгo estб em um veнculo.");
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if(i == playerid) continue;
        SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), i, 0, 1);
    }
    SendClientMessage(playerid, -1, "Veнculo trancado!");
    return 1;
}
Murilo_sousa ele nгo sabe oque e ZCMD '-'


Re: /trancar para carros - Maklister - 08.09.2012

Assim voce quer strcmp

pawn Код:
if (strcmp("/trancar", cmdtext, true, 10) == 0)
{
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "[x] Vocк nгo estб em um veнculo.");
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if(i == playerid) continue;
        SetVehicleParamsForPlayer(GetPlayerVehicleID(playerid), i, 0, 1);
    }
    SendClientMessage(playerid, -1, "Veнculo trancado!");
    return 1;
}

#EDIT nem vi Diogo123 acostumei so postar / fazer em zcmd