[Pedido]Comando /Sync
#1

Queria um comando que a pessoa digitasse /Sync ou /s e ele era sincronizado, tipo, ele era Spawnado e depois voltava pro mesmo lugar com as mesmas armas +/- isso
Desde jб agradeзo! :P
Reply
#2

pawn Код:
if (strcmp("/sync", cmdtext, true, 10) == 0)
{
   SpawnPlayer(playerid);
   return 1;
}
Reply
#3

nгo intendeu .-.
Tipo ja viu aqueles comandos de sincronizar o player quando ta bugado em A/D ou GangWar
Tipo isso
ele й spawnado rapido e depois volta com as mesmas armas que tinha antes pro mesmo lugar que tava...
se puder me ajudar agradeзo.

Este foro requiere que tъ esperes 120 segundos entre mensajes. Por favor intenta de nuevo en 3 segundos.
Reply
#4

pawn Код:
if(strcmp(cmd, "/s", true) == 0 || strcmp(cmd, "/sync", true) == 0)
{
   SpawnPlayer(playerid);
   return 1;
}
й o mesmo do [LF]PlaYer so add /s e o /sync como vc pediu la em cima
Reply
#5

Quote:
Originally Posted by [LF]PlaYer
Посмотреть сообщение
pawn Код:
if (strcmp("/sync", cmdtext, true, 10) == 0)
{
   SpawnPlayer(playerid);
   return 1;
}
Isso soh spawna o jogador e nao salva as armas e nem volta para a posiзao de antes.

pawn Код:
public Sincronizar(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        SetPlayerPos(playerid,xx[playerid],yy[playerid],zz[playerid]);
        SetPlayerFacingAngle(playerid,FaceAngle[playerid]);
        SetPlayerHealth(playerid,PlayerHPP[playerid]);
        SetPlayerVirtualWorld(playerid,virt[playerid]);
        SetPlayerInterior(playerid,interior[playerid]);
        SetPlayerSkin(playerid,skinneg[playerid]);
        SetPlayerArmour(playerid,APP[playerid]);
        ResetPlayerWeapons(playerid);
        GivePlayerWeapon(playerid,gunsinc[1][playerid],ammoo[1][playerid]);
        GivePlayerWeapon(playerid,gunsinc[2][playerid],ammoo[2][playerid]);
        GivePlayerWeapon(playerid,gunsinc[3][playerid],ammoo[3][playerid]);
        GivePlayerWeapon(playerid,gunsinc[4][playerid],ammoo[4][playerid]);
        GivePlayerWeapon(playerid,gunsinc[5][playerid],ammoo[5][playerid]);
        GivePlayerWeapon(playerid,gunsinc[6][playerid],ammoo[6][playerid]);
        GivePlayerWeapon(playerid,gunsinc[7][playerid],ammoo[7][playerid]);
        GivePlayerWeapon(playerid,gunsinc[8][playerid],ammoo[8][playerid]);
        GivePlayerWeapon(playerid,gunsinc[9][playerid],ammoo[9][playerid]);
        GivePlayerWeapon(playerid,gunsinc[10][playerid],ammoo[10][playerid]);
        GivePlayerWeapon(playerid,gunsinc[11][playerid],ammoo[11][playerid]);
        GivePlayerWeapon(playerid,gunsinc[12][playerid],ammoo[12][playerid]);
        if(vehicledd[playerid] == 1) { PutPlayerInVehicle(playerid,VehicleIDD[playerid],1); vehicledd[playerid] = 0; }
        sincronizando[playerid] = 0;
        KillTimer(TempoSinc);
        SendClientMessage(playerid,COLOR_YELLOW," Sincronizado com sucesso!");
        return 1;
    }
    return 1;
}
pawn Код:
if(strcmp(cmdtext, "/sync", true) == 0 || strcmp(cmdtext, "/s", true) == 0)
{
if(GetPlayerState(playerid) == 9|| GetPlayerState(playerid) == 5 || GetPlayerState(playerid) == 6 ||GetPlayerState(playerid) == 4|| GetPlayerState(playerid) == 0 || sincronizando[playerid] == 1)
{
    SendClientMessage(playerid,COLOR_YELLOW," Vocк nгo pode sincronizar agora!");
    return 1;
}
    sincronizando[playerid] = 1;
    virt[playerid] = GetPlayerVirtualWorld(playerid);
    interior[playerid] = GetPlayerInterior(playerid);
    skinneg[playerid] = GetPlayerSkin(playerid);
    GetPlayerArmour(playerid,APP[playerid]);
    GetPlayerHealth(playerid,PlayerHPP[playerid]);
    GetPlayerFacingAngle(playerid,FaceAngle[playerid]);
    GetPlayerPos(playerid,xx[playerid],yy[playerid],zz[playerid]);
    GetPlayerWeaponData(playerid,1,gunsinc[1][playerid],ammoo[1][playerid]);
    GetPlayerWeaponData(playerid,2,gunsinc[2][playerid],ammoo[2][playerid]);
    GetPlayerWeaponData(playerid,3,gunsinc[3][playerid],ammoo[3][playerid]);
    GetPlayerWeaponData(playerid,4,gunsinc[4][playerid],ammoo[4][playerid]);
    GetPlayerWeaponData(playerid,5,gunsinc[5][playerid],ammoo[5][playerid]);
    GetPlayerWeaponData(playerid,6,gunsinc[6][playerid],ammoo[6][playerid]);
    GetPlayerWeaponData(playerid,7,gunsinc[7][playerid],ammoo[7][playerid]);
    GetPlayerWeaponData(playerid,8,gunsinc[8][playerid],ammoo[8][playerid]);
    GetPlayerWeaponData(playerid,9,gunsinc[9][playerid],ammoo[9][playerid]);
    GetPlayerWeaponData(playerid,10,gunsinc[10][playerid],ammoo[10][playerid]);
    GetPlayerWeaponData(playerid,11,gunsinc[11][playerid],ammoo[11][playerid]);
    GetPlayerWeaponData(playerid,12,gunsinc[12][playerid],ammoo[12][playerid]);
    if(IsPlayerInAnyVehicle(playerid))
    {
        vehicledd[playerid] = 1;
        VehicleIDD[playerid] = GetPlayerVehicleID(playerid);
    }
    SpawnPlayer(playerid);
    TempoSinc = SetTimerEx("Sincronizar", 500, 0, "i", playerid);
    return 1;
}
Espero ter ajudado
Reply
#6

pawn Код:
if(GetPlayerState(playerid) == 9|| GetPlayerState(playerid) == 5 || GetPlayerState(playerid) == 6 ||GetPlayerState(playerid) == 4|| GetPlayerState(playerid) == 0 || sincronizando[playerid] == 1)
Код:
G:\Samp\Test\filterscripts\Comandos.pwn(1327) : error 017: undefined symbol "sincronizando"
G:\Samp\Test\filterscripts\Comandos.pwn(1327) : warning 215: expression has no effect
G:\Samp\Test\filterscripts\Comandos.pwn(1327) : error 001: expected token: ";", but found "]"
G:\Samp\Test\filterscripts\Comandos.pwn(1327) : error 029: invalid expression, assumed zero
G:\Samp\Test\filterscripts\Comandos.pwn(1327) : fatal error 107: too many error messages on one line
Deu esses Erros
Reply
#7

pawn Код:
new sincronizando[MAX_PLAYERS];
Tenta ae
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)