SA-MP Forums Archive
[Pedido] comando - 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] comando (/showthread.php?tid=387484)



comando - [toːkʲoː]_Shinjuku_.] - 25.10.2012

galera ajuda ai nun comando

tipo o cara faz /moto e parace uma nrg -500 na frente dele ai ele saiu do veiculo 'moto' e ela some

teria como cria um desse para mim ?


Re: comando - Diogo123 - 25.10.2012

Aqui e.e
CMD:nrg(playerid, params[])
{
new Float:X;
new Float:Y;
new Float:Z;
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
new string[128];
format(string, sizeof(string), "[AVISO] %s Fez uma nrg-500 (/nrg)", pname );
SendClientMessageToAll(-1, string);
GetPlayerPos(playerid,X,Y,Z);
CreateVehicle(522,X,Y+5,Z,1,1,1,90000);
return 1;
}


e.e eu esqueci como faz para ela sumir quando sai '-'



Re: comando - WLSF - 25.10.2012

Algo do tipo ?

pawn Код:
new gVeh;

public OnPlayerCommandText (playerid, cmdtext[])
{
    if (!strcmp(cmdtext,"/moto"))
    {
        new Float:x, Float:y, Float:z;
        GetPlayerPos (playerid, x, y, z);
        gVeh = CreateVehicle (522, x, y, z, 0.0, -1, -1, 9999999);
        PutPlayerInVehicle (playerid, gVeh, 0);
        return 1;
    }
    return 0;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    if (vehicleid == gVeh)
    {
        DestroyVehicle (gVeh);
        return 1;
    }
    return 0;
}



Re: comando - [toːkʲoː]_Shinjuku_.] - 25.10.2012

valeu carinha que mora logo ali
+ reep para os 2 ^^


Re: comando - ForT - 25.10.2012

PHP код:
// no topo
new nrg[80];
//comando
CMD:nrg(playerid)
{
    new 
Float:pXFloat:pYFloat:pZ;
    
GetPlayerPos(playeridpXpYpZ);
    
nrg[playerid] = CreateVehicle(522pXpYpZ0.0,-1,-1, -1);
    
PutPlayerInVehicle(playeridnrg[playerid], 0);
    return 
true;
}
//OnPlayerExitVehicle
if(vehicleid == nrg[playerid])
{
    
DestroyVehicle(nrg[playerid]);