GTAOnline.net

San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: SplasH-wp le 04 Août 2010, 10:46:18

Titre: Bug Banque LARP By Will Wayne
Posté par: SplasH-wp le 04 Août 2010, 10:46:18
Bonjour,
Je post car j'ai un soucis, on ne peut pas entrer dans la banque j'ai essayer des /entrer partout devant ou il y a le"$" et que dal. Voila mon Script de banque :

//----------------------------------[Bank System]-----------------------------------------------
    if(strcmp(cmd, "/retirer", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
       if(PlayerInfo[playerid][pLocal] == 103 || PlayerToPoint(1.5, playerid, 1346.5016,-1758.7649,13.5156) || PlayerToPoint(1.5, playerid, 1592.7152,-2335.3748,13.5400) || PlayerToPoint(1.5, playerid, 2308.4612,-1634.4176,14.8270) || PlayerToPoint(1.5, playerid, 2865.9014,-1415.4203,11.0061) || PlayerToPoint(1.5, playerid, 2404.5913,-1229.8973,23.8301) || PlayerToPoint(1.5, playerid, 1172.5912,-1328.4365,15.4034))
       {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /retirer [montant]");
format(string, sizeof(string), "Vous avez $%d sur votre compte.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /retirer [montant]");
format(string, sizeof(string), "Vous avez $%d sur votre compte.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "Vous n'avez pas cette somme sur votre compte bancaire!");
return 1;
}
    //ConsumingMoney[playerid] = 1;
SafeGivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), "Vous avez retiré $%d de votre compte, Il vous reste: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
else
{
   SendClientMessage(playerid, COLOR_GREY, "Vous n'êtes pas a la banque!");
           return 1;
}
}
return 1;
}
if(strcmp(cmd, "/deposer", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
       if(PlayerInfo[playerid][pLocal] != 103)
       {
           SendClientMessage(playerid, COLOR_GREY, "Vous n'êtes pas a la banque!");
           return 1;
       }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /deposer [montant]");
format(string, sizeof(string), "Vous avez $%d sur votre compte bancaire.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /deposer [montant]");
format(string, sizeof(string), "Vous avez $%d sur votre compte bancaire.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > GetPlayerMoney(playerid) || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, "Vous n'avez pas cette somme sur vous.");
return 1;
}
SafeGivePlayerMoney(playerid,-cashdeposit);
new curfunds = PlayerInfo[playerid][pAccount];
PlayerInfo[playerid][pAccount]=cashdeposit+PlayerInfo[playerid][pAccount];
SendClientMessage(playerid, COLOR_WHITE, "|___________ Extrait de Compte ___________|");
format(string, sizeof(string), "  Argent sur le compte avant depôt: $%d", curfunds);
SendClientMessage(playerid, COLOR_GRAD2, string);
format(string, sizeof(string), "  Somme déposée: $%d",cashdeposit);
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_GRAD6, "|------------------------------------------|");
format(string, sizeof(string), "  Argent sur le compte après dépôt: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
return 1;
}
if(strcmp(cmd, "/compte", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
if(PlayerInfo[playerid][pLocal] == 103 || PlayerToPoint(1.5, playerid, 1346.5016,-1758.7649,13.5156) || PlayerToPoint(1.5, playerid, 1592.7152,-2335.3748,13.5400) || PlayerToPoint(1.5, playerid, 2308.4612,-1634.4176,14.8270) || PlayerToPoint(1.5, playerid, 2865.9014,-1415.4203,11.0061) || PlayerToPoint(1.5, playerid, 2404.5913,-1229.8973,23.8301) || PlayerToPoint(1.5, playerid, 1172.5912,-1328.4365,15.4034))
       {
format(string, sizeof(string), "Vous avez $%d sur votre compte bancaire.",PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
else
{
   SendClientMessage(playerid, COLOR_GREY, "Vous n'êtes pas à la banque!");
           return 1;
}
}
return 1;
}

Merci  D'avance de vos réponse.
Vous allez peut être me prendre pour un "plot" mais je débute.
Cordialement,
Splash-WP fondateur
Titre: Re : Bug Banque LARP By Will Wayne
Posté par: SplasH-wp le 04 Août 2010, 19:42:14
Merci Dizzy
Titre: Re : Re : Bug Banque LARP By Will Wayne
Posté par: scott1 le 05 Août 2010, 07:26:26
Lol !!

Tu t'attribue un code ?? Qui n'est pas de toi ?? Tu dit "MON SCRIPT" en réalité sais celui du gm de LARP ....

 :boulet

Splash, donne nous la commande /entrer
Titre: Re : Bug Banque LARP By Will Wayne
Posté par: SplasH-wp le 05 Août 2010, 12:37:57
J'ai regarder et le /entrer de la banque n'y est pas  :lmfao :lmfao quelqu'un pourrait me le faire
Titre: Re : Bug Banque LARP By Will Wayne
Posté par: scott1 le 05 Août 2010, 13:40:11
Dans un larp il y a une commande /entrer --'
Titre: Re : Bug Banque LARP By Will Wayne
Posté par: SplasH-wp le 05 Août 2010, 16:01:33
Il y a une commande pour chaque entrer possible ?
Titre: Re : Bug Banque LARP By Will Wayne
Posté par: Brian Turner le 06 Août 2010, 00:36:48
la commande est /enter et pas /entrer car larp est anglais.
Titre: Re : Bug Banque LARP By Will Wayne
Posté par: Darek le 06 Août 2010, 15:13:33
Voici (( je boss ak lui ))
if(strcmp(cmd, "/entrer", true) == 0)
{
    if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
//printf("Found House :%d",i);
if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
{
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
SetPlayerVirtualWorld(playerid,HouseInfo[i][hWorld]);
SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
GameTextForPlayer(playerid, "~w~Bievenue a la maison", 5000, 1);
PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
PlayerInfo[playerid][pLocal] = i;
HouseEntered[playerid] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Fermer", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
{
//printf("Found House :%d",i);
if(!IsACop(playerid) && i == 3)
{
    SendClientMessage(playerid, COLOR_GREY, "Seulement les policiers!");
    return 1;
}
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(BizzInfo[i][bLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Fermer", 5000, 1);
return 1;
}
if(BizzInfo[i][bProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Plus de Stock", 5000, 1);
return 1;
}
SafeGivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
format(string, sizeof(string), "~r~-$%d~n~~w~type /sortir~n~pour sortir", BizzInfo[i][bEntranceCost]);
BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
BizzInfo[i][bProducts]--;
OnPropUpdate();
GameTextForPlayer(playerid, string, 5000, 3);
}
SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
PlayerInfo[playerid][pLocal] = i+99;
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s à payé $%d pour entrer dans le biz %d", dood, BizzInfo[i][bEntranceCost], i);
printf("%s", string);
PayLog(string);
//PlayerInfo[playerid][pLocal] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Pas assez d argent", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(SBizzInfo); i++)
{
if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
{
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= SBizzInfo[i][sbEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(SBizzInfo[i][sbLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Fermer", 5000, 1);
return 1;
}
if(SBizzInfo[i][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Plus de Stock", 5000, 1);
return 1;
}
if(i == 10)
{
    PaintballPlayers ++;
    PlayerPaintballing[playerid] = 1;
    new rand = random(sizeof(PaintballSpawns));
SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
TogglePlayerControllable(playerid, 0);
}
else if(i == 11)
{
    PlayerKarting[playerid] = 1;
    SendClientMessage(playerid, TEAM_GROVE_COLOR, "Vous pouvez participer a la course kart, prenez un kart.");
}
else
{
    return 1;
}
SafeGivePlayerMoney(playerid,-SBizzInfo[i][sbEntranceCost]);
gSpentCash[playerid] = GetPlayerMoney(playerid);
SBizzInfo[i][sbProducts]--;
SBizzInfo[i][sbTill] += SBizzInfo[i][sbEntranceCost];
ExtortionSBiz(i, SBizzInfo[i][sbEntranceCost]);
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s à payé $%d pour entrer dans le sbiz", dood, SBizzInfo[i][sbEntranceCost], i);
printf("%s", string);
PayLog(string);
OnPropUpdate();
}
}
else
{
GameTextForPlayer(playerid, "~r~Pas assez d argent", 5000, 1);
}
}
}
if (PlayerToPoint(3.0, playerid,2695.6235,-1704.6960,11.8438))
{
    GameTextForPlayer(playerid, "~w~Bievenue au 8ball Track", 5000, 1);
    SetPlayerInterior(playerid,7);
    PlayerInfo[playerid][pInt] = 7;
SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
}
else if (PlayerToPoint(8.0, playerid,-2111.5686,-443.9720,38.7344))
{
    GameTextForPlayer(playerid, "~w~Bievenue au the Dirt Track", 5000, 1);
    SetPlayerInterior(playerid,4);
    PlayerInfo[playerid][pInt] = 4;
SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472);
}
else if (PlayerToPoint(8.0, playerid,-2080.3079,-406.0309,38.7344))
{
    GameTextForPlayer(playerid, "~w~Bievenue au the Stunting Track", 5000, 1);
    SetPlayerInterior(playerid,14);
    PlayerInfo[playerid][pInt] = 14;
SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
}
else if (PlayerToPoint(4, playerid,2073.2979,-1831.1228,13.5469))
{ // Pay & Spray
    if(GetPlayerState(playerid) == 2)
    {
        if(GetPlayerMoney(playerid) > SBizzInfo[5][sbEntranceCost] + 100)
        {
            if(SBizzInfo[5][sbProducts] > 0)
            {
            new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 2062.1294,-1831.5498,13.5469);
        SetVehicleZAngle(tmpcar, 90);
        SafeGivePlayerMoney(playerid, - SBizzInfo[5][sbEntranceCost]);
        SBizzInfo[5][sbTill] += SBizzInfo[5][sbEntranceCost];
        SBizzInfo[5][sbProducts]--;
        SetTimerEx("AfterSpray1", 5000, false, "i", playerid);
}
else
{
    GameTextForPlayer(playerid, "~r~Plus de Stock", 5000, 1);
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "Vous n'avez pas assez d'argent pour reparer votre voiture.");
}
    }
}
else if (PlayerToPoint(4, playerid,1024.9756,-1030.7930,32.0257))
{ // Pay & Spray
    if(GetPlayerState(playerid) == 2)
    {
        if(GetPlayerMoney(playerid) > SBizzInfo[5][sbEntranceCost] + 100)
        {
            if(SBizzInfo[5][sbProducts] > 0)
            {
            new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1024.9763,-1021.8850,32.1016);
        SetVehicleZAngle(tmpcar, 0);
        SafeGivePlayerMoney(playerid, - SBizzInfo[5][sbEntranceCost]);
        SBizzInfo[5][sbTill] += SBizzInfo[5][sbEntranceCost];
        SBizzInfo[5][sbProducts]--;
        SetTimerEx("AfterSpray2", 5000, false, "i", playerid);
}
else
{
    GameTextForPlayer(playerid, "~r~Plus de Stock", 5000, 1);
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "Vous n'avez pas assez d'argent pour reparer votre voiture.");
}
    }
}
else if (PlayerToPoint(4, playerid,488.3819,-1733.0563,11.1752))
{ // Pay & Spray
    if(GetPlayerState(playerid) == 2)
    {
        if(GetPlayerMoney(playerid) > SBizzInfo[5][sbEntranceCost] + 100)
        {
            if(SBizzInfo[5][sbProducts] > 0)
            {
            new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 487.4099,-1741.4585,11.1330);
        SetVehicleZAngle(tmpcar, 180);
        SafeGivePlayerMoney(playerid, - SBizzInfo[5][sbEntranceCost]);
        SBizzInfo[5][sbTill] += SBizzInfo[5][sbEntranceCost];
        SBizzInfo[5][sbProducts]--;
        SetTimerEx("AfterSpray3", 5000, false, "i", playerid);
}
else
{
    GameTextForPlayer(playerid, "~r~Plus de Stock", 5000, 1);
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "Vous n'avez pas assez d'argent pour reparer votre voiture.");
}
    }
}
else if (PlayerToPoint(4, playerid,719.8940,-464.8272,16.3359))
{ // Pay & Spray
    if(GetPlayerState(playerid) == 2)
    {
        if(GetPlayerMoney(playerid) > SBizzInfo[5][sbEntranceCost] + 100)
        {
            if(SBizzInfo[5][sbProducts] > 0)
            {
            new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 720.3924,-456.0286,16.3359);
        SetVehicleZAngle(tmpcar, 0);
        SafeGivePlayerMoney(playerid, - SBizzInfo[5][sbEntranceCost]);
        SBizzInfo[5][sbTill] += SBizzInfo[5][sbEntranceCost];
        SBizzInfo[5][sbProducts]--;
        SetTimerEx("AfterSpray4", 5000, false, "i", playerid);
}
else
{
    GameTextForPlayer(playerid, "~r~Plus de Stock", 5000, 1);
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "Vous n'avez pas assez d'argent pour reparer votre voiture.");
}
    }
}
}
return 1;
}

Cordialement
Titre: Re : Bug Banque LARP By Will Wayne
Posté par: steve76 le 06 Août 2010, 15:40:20
C'est quand même incroyable ça, il y a des règles d'établies, c'est pour qu'elles soient suivies

Si un code est trop long, il faut le mettre sur pastbin, sinon ca encombre la page et c'est illisible...
Titre: Re : Bug Banque LARP By Will Wayne
Posté par: Darek le 06 Août 2010, 18:03:14
bref merci quand meme ;)

Mais si vous dites sa , ne faites pas des supports ;)

Bye
Titre: Re : Bug Banque LARP By Will Wayne
Posté par: SplasH-wp le 07 Août 2010, 13:57:11
Ecoute dizzy darek a totalement le droit de répondre a ma place car c'est le 2eme fondateur de mon serveur (je suis le premier) donc je l'autorise a parler a ma place !