Salut tout le monde ca fait quelque temps ( 1 mois ) que je script en pawn mais j ai une erreur que j arrive pas a regle c' est pour un god father doncje voudrais que des qu on fait la cmd
retirer et qu on soit devant un distributeur ATM on peut retirer de l argent jusquel a c' est facile on fait plusieurs playertopoint dans une condition mais moi je veut en faire qu une
en haut du script j ai mi ca
new Float:distributeurs[18][18] = {
{1928.5719, -1769.9524, 13.1898},//1
{1358.6758, -1759.2550, 13.1507},//2
{604.3591, -1243.0150, 17.9907},//3
{599.6340, -1244.8777, 17.9191},//4
{1202.7328, -919.4324, 42.7289},//5
{1629.6599, -2204.3918, 13.1398},// 6
{2324.2830, -1644.9324, 14.4699},//7
{1674.1082, -1714.6654, 13.2606},//8
{1674.1047, -1715.8179, 13.2294},//9
{1489.8966, -1310.5433, 13.4487},//10
{1488.7264, -1310.5183, 13.4381},//11
{1385.7639, -1165.4080, 23.4444},//12
{1495.7545, -1022.2512, 23.4766},//13
{2404.3657, -1240.2532, 23.1244},//14
{2499.4209, -1759.9022, 12.9016},//15
{2099.4204, -1451.2543, 23.6014},//16
{1549.7043, -1714.8534, 13.1304},//17
{763.7696, -1683.6720, 3.7124}//18
};
et la cmd /retirer un peu modif par moi
if(strcmp(cmd, "/retirer", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerToPoint(2,playerid,distributeurs))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "UTILISATION: /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, "UTILISATION: /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 autant !");
return 1;
}
ConsumingMoney[playerid] = 1;
GivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), " Vous avez retiré $%d de votre compte Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_YELLOW, string);
}
else if(PlayerInfo[playerid][pLocal] != 103)
{
SendClientMessage(playerid, COLOR_GREY, " Vous n'êtes pas dans une banque ou à cote d' un distributeur !");
return 1;
}
else
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "UTILISATION: /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, "UTILISATION: /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 autant !");
return 1;
}
ConsumingMoney[playerid] = 1;
GivePlayerMoney(playerid,cashdeposit);
PlayerInfo[playerid][pAccount]=PlayerInfo[playerid][pAccount]-cashdeposit;
format(string, sizeof(string), " Vous avez retiré $%d de votre compte Total: $%d ", cashdeposit,PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_YELLOW, string);
return 1;
}
}
return 1;
}
et j ai une erreur que j arrive pas a corrige c' est celle la
D:\serveur samp\gamemodes\gfv18.pwn(14755) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
la ligne de l erreur est
if(PlayerToPoint(2,playerid,distributeurs))
la condition