18.03.2015, 23:15
Alguem converte esse cmd para strcmp ? sou novato no pawno rs.. desculpem
Quando tentei deu isso ..
(8701) : error 017: undefined symbol "params"
PHP код:
CMD:challenge(playerid, params[])
{
new rplayer, bet;
if(!sscanf(params,"ui",rplayer,bet))
{
if(IsPlayerConnected(rplayer) && !IsPlayerNPC(playerid))
{
if(IsPlayerInAnyVehicle(rplayer))
{
if(IsPlayerInAnyVehicle(playerid))
{
if(bet <= 50000 && bet >= 5000)
{
if(GetPlayerMoney(playerid) >= bet)
{
if(GetPVarInt(rplayer,"LRRequest") == -1)
{
if(GetPVarInt(rplayer,"LR") == -1)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
if(IsPlayerInRangeOfPoint(rplayer,16,X,Y,Z))
{
new msg[24];
format(msg,24,"Bet: %i $",bet);
SendClientMessage(playerid,COLOR_LIGHTBLUE,msg);
SetPVarInt(playerid,"bet",bet);
SetPVarInt(rplayer,"bet",bet);
SetPVarInt(rplayer, "LRRequest", playerid);
SetPVarInt(playerid, "LRRequest", rplayer);
new info[160], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,pname,sizeof(pname));
format(info,160,"%s is asking you to start a challenege race\n with a bet of $%i, do you want to do this?",pname,bet);
ShowPlayerDialog(rplayer, 1337, DIALOG_STYLE_MSGBOX,"Challenge Race:",info,"Ofcouse","Nope");
TogglePlayerControllable(playerid,false);
} else SendClientMessage(playerid, COLOR_BRIGHTRED, "You should be near to that player.");
} else SendClientMessage(playerid, COLOR_BRIGHTRED, "Player is currently racing.");
} else SendClientMessage(playerid, COLOR_BRIGHTRED, "Player is already invited by someone.");
} else SendClientMessage(playerid, COLOR_BRIGHTRED, "You don't have that much money..");
} else SendClientMessage(playerid, COLOR_RED, "Min Amount: $5,000 Max Amount: $50,000");
} else SendClientMessage(playerid, COLOR_BRIGHTRED, "You need a vehicle to challenge someone.");
} else SendClientMessage(playerid, COLOR_BRIGHTRED, "The player you want to challenge doesn't have a vehicle.");
} else SendClientMessage(playerid, COLOR_RED, "Player is not connected.");
} else SendClientMessage(playerid, COLOR_RED, "Usage: /challenge [Player ID] [Bet Amount]");
return true;
}
(8701) : error 017: undefined symbol "params"