[Pomoc]Oduzimanje novca

Započeo caupton, Septembar 19, 2011, 16:38:51 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.


Koji gamemod koristite?:CynixRP
Koje vam se gre¹ke javljaju u skripti?:Ovako zelim da napravim kada policajac veze nekog igraca,da se tom igracu sto je vezan oduzme 50k sa racuna (u slucaju bjega sa servera).E sada kada ga policajac odveze da mu se vrate tih 50k..Molim pomoc
Dio skripte na kojim se javljaju gre¹ke?:
Ewo dole /cuff /uncuff
Hvala svima koji pomognu




CMD:cuff(playerid, params[])
{
new string[128];
new idx;

new  sendername[MAX_PLAYER_NAME];
new  giveplayer[MAX_PLAYER_NAME];
   if(IsPlayerConnected(playerid))
   {
if(IsACop(playerid))
{
   temp = strtok(params, idx);
if(!strlen(temp)) {
SendClientMessage(playerid, COLOR_WHITE, "{168BFF}INFO: {959561} /cuff {959561}[ID/DioImena] {838361}");
return 1;
}
giveplayerid = ReturnUser(temp);
   if(IsPlayerConnected(giveplayerid))
{
   if(giveplayerid != INVALID_PLAYER_ID)
   {
      if(IsACop(giveplayerid))
       {
           SendClientMessage(playerid, COLOR_GREY, "   Ne mozes cuffovati PD/FBI/SWAT !");
       return 1;
       }
   if(PlayerCuffed[giveplayerid] > 0)
   {
       SendClientMessage(playerid, COLOR_GREY, "   Igracu su vec stavljene lisice !");
       return 1;
   }
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
   new car = GetPlayerVehicleID(playerid);
   if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Ne mozes sam sebe cuffovati!"); return 1; }
   if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, car))
   {
       GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
       format(string, sizeof(string), "%s ti je stavio lisice, sve dok ih on ne skine.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Stavio si lisice igracu %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " %s vadi lisice i stavlja ih %s.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(giveplayerid, "~r~Uhvacen", 2500, 3);
TogglePlayerControllable(giveplayerid, 0);
PlayerCuffed[giveplayerid] = 2;
PlayerCuffedTime[giveplayerid] = 180;
   }
   else
   {
       SendClientMessage(playerid, COLOR_GREY, "   Igrac nije u vozilu ili ti nisi vozac !");
       return 1;
   }
}
else
{
   SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije u tvojoj blizini !");
   return 1;
}
}
}
else
{
   SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije online!");
   return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "   Nisi policajac / FBI / National Guard !");
}
}
return 1;
}
CMD:uncuff(playerid, params[])
{
new string[128];
new idx;

new  sendername[MAX_PLAYER_NAME];
new  giveplayer[MAX_PLAYER_NAME];
   if(IsPlayerConnected(playerid))
   {
if(IsACop(playerid))
{
   temp = strtok(params, idx);
if(!strlen(temp)) {
SendClientMessage(playerid, COLOR_WHITE, "{168BFF}INFO: {959561} /uncuff {959561}[ID/DioImena] {838361}");
return 1;
}
giveplayerid = ReturnUser(temp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
   if (ProxDetectorS(8.0, playerid, giveplayerid))
{
   if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Ne mozes sam sebe osloboditi!"); return 1; }
if(PlayerCuffed[giveplayerid])
{
   GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
   format(string, sizeof(string), "* Igrac %s ti je skinuo lisice.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Oslobodio si igraca %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
GameTextForPlayer(giveplayerid, "~g~Oslobodjen", 2500, 3);
TogglePlayerControllable(giveplayerid, 1);
PlayerCuffed[giveplayerid] = 0;
}
else
{
   SendClientMessage(playerid, COLOR_GREY, "   Igrac nije cuffovan !");
   return 1;
}
}
else
{
   SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije blizu tebe! !");
   return 1;
}
}
}
else
{
   SendClientMessage(playerid, COLOR_GREY, "   Taj igrac nije online!");
   return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "   Nisi policajac / FBI / National Guard !");
}
}//not connected
return 1;
}
Poslednja Izmena: Septembar 19, 2011, 16:39:10 POSLE PODNE od |BD|Sch0pEr|Zabranjeni|


pa nisi trebo brisat sta ima veze nek se zna o cemu se bar radilo
Respect: Gagi, Maki187, Phillips, TerminuS, Neno, Lepotic, [AL] K4[Я]!K3â,,¢, Gotti747