ID bug when i do /rob and playerid he say write ID -
MichealScript - 07.05.2014
When i type /rob or /rape or /kidnap or every command that need ID player to do it he say type the ID of player.
what to do

?
Re: ID bug when i do /rob and playerid he say write ID -
Nathan_Taylor - 07.05.2014
/rob [playerid]
If they are player ID # 3 then do
/rob 3
Hit tab to see player ids
Re: ID bug when i do /rob and playerid he say write ID -
UnknownGamer - 08.05.2014
Quote:
Originally Posted by MichealScript
When i type /rob or /rape or /kidnap or every command that need ID player to do it he say type the ID of player.
what to do  ?
|
If you mean how to do it...
pawn Код:
YCMD:rape(playerid, params[], help)
{
if(help) return SCM(playerid, COLOR_GREY, "Not supported");
new pid;
if(sscanf(params, "d", pid)) return SCM(playerid, -1, "USAGE: /rape [playerid]");
// code goes here
return 1;
}
Re: ID bug when i do /rob and playerid he say write ID -
MichealScript - 08.05.2014
No No i mean the IDs are bugged !!!!
when you do command with ID and type player ID he still say you "type /rob (playerid) or /rape (playerid) or this things and i already type playerid but he say me that me need to type it.
its plugins bug?
Re: ID bug when i do /rob and playerid he say write ID -
AndySedeyn - 08.05.2014
Show us your code.
Re: ID bug when i do /rob and playerid he say write ID -
MichealScript - 08.05.2014
Ok ,
dcmd_rob(playerid,params[])
{
new string[128];
new ID;
if(sscanf(params, "u", ID))
{
SendClientMessage(playerid,COLOR_ERROR,"USAGE: /rob (Player Name/ID)");
return 1;
}
if(IsSpawned[playerid] != 1)
{
SendClientMessage(playerid,COLOR_ERROR,"[ERROR] You must be alive and spawned in order to be able to use this command.");
return 1;
}
if(CommandsBlocked[playerid] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"[ERROR] Your commands are blocked, You cannot use commands.");
return 1;
}
if(InDuel[playerid] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"[ERROR] You cannot use commands while on duel, Use /leaveduel to exit the duel.");
return 1;
}
if(IsFrozen[playerid] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"[ERROR] You have been frozen by a Server Administrator. You cannot use this command.");
return 1;
}
if(InAdminMode[ID] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"[ERROR] You cannot use this command on this player because they are in Administrator mode.");
return 1;
}
if(InVIPMode[ID] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"[ERROR] You cannot use this command on this player because they are in VIP mode.");
return 1;
}
if(IsKidnapped[playerid] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"[ERROR] You are kidnapped. You cannot use this command.");
return 1;
}
if(gTeam[playerid] != TEAM_THIEF && gTeam[playerid] != TEAM_GANGZ)
{
SendClientMessage(playerid,COLOR_ERROR,"[ERROR] Only GangZ members and Thieves can rob players of their money.");
return 1;
}
if(!IsPlayerConnected(ID))
{
format(string,sizeof(string),"[ERROR] The player ID (%d) is not connected to the server. You cannot rob them",ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(GetDistanceBetweenPlayers(playerid,ID) > 4)
{
format(string,sizeof(string),"[ERROR] %s(%d) is too far away. You cannot reach him to rob him.",PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetPlayerState(playerid) == PLAYER_STATE_PASSENGER)
{
SendClientMessage(playerid,COLOR_ERROR,"[ERROR] You cannot rob someone while in a vehicle. Exit the vehicle first.");
return 1;
}
if(GetPlayerState(ID) == PLAYER_STATE_DRIVER || GetPlayerState(ID) == PLAYER_STATE_PASSENGER)
{
SendClientMessage(playerid,COLOR_ERROR,"[ERROR] You cannot rob someone while they are in a vehicle. Get them to exit the vehicle first.");
return 1;
}
if(playerid == ID)
{
SendClientMessage(playerid,COLOR_ERROR,"[ERROR] You cannot rob yourself, how can you even manage that?");
return 1;
}
if(IsSpawned[ID] != 1)
{
format(string,sizeof(string),"[ERROR] %s(%d) is not spawned. You cannot rob dead people ..",PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(IsFrozen[ID] == 1)
{
format(string,sizeof(string),"[ERROR] %s(%d) is frozen by a Server Administrator. You cannot rob them.",PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_ERROR,string);
return 1;
}
if(AttemptedToRobRecently[playerid] >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"[ERROR] You are too tired from your last rob attempt. Please wait before robbing again.");
return 1;
}
if(HasRobbedRecently[playerid] >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"[ERROR] You are too tired from the last person you robbed. Please wait before robbing again.");
return 1;
}
if(GetPlayerMoney(ID) <= 0)
{
SendClientMessage(playerid,COLOR_ERROR,"[ERROR] That player has no money in their pockets. What would be the point in robbing them?");
return 1;
}
new crand = random(100);
if(crand <= 30)
{
SendClientMessage(playerid,COLOR_ERROR,"[ERROR] Rob attempt failed. The player slipped out of your grasp.");
AttemptedToRobRecently[playerid] =35;
return 1;
}
if(GetDistanceBetweenPlayers(playerid,ID) <= 4 && crand > 30)
{
new current_zone = player_zone[playerid];
new mrand =random(GetPlayerMoney(ID));
SendClientMessage(playerid,COLOR_DEADCONNECT,"[[_Player Robbed_]]");
format(string,sizeof(string),"You have robbed $%d from %s(%d). Careful they dont come after you!",mrand,PlayerName(ID),ID);
SendClientMessage(playerid,COLOR_RED,string);
GivePlayerMoney(playerid,mrand);
IncreaseWantedLevel(playerid,

;
HasRobbedRecently[playerid] =180;
IncreasePlayerScore(playerid,3);
SendClientMessage(ID,COLOR_DEADCONNECT,"[[_Robbed_]]");
format(string,sizeof(string),"You have had $%d robbed from you by %s(%d). Kill them for your money back or run!",mrand,PlayerName(playerid),playerid);
SendClientMessage(ID,COLOR_RED,string);
GivePlayerMoney(ID,-mrand);
format(string,sizeof(string),"[POLICE RADIO] Robbery: %s(%d) has robbed $%d from %s(%d). Location: %s.",PlayerName(playerid),playerid,mrand,PlayerNam e(ID),ID,zones[current_zone][zone_name]);
SendClientMessageToAllCops(string);
return 1;
}
return 1;
}
Re: ID bug when i do /rob and playerid he say write ID -
MichealScript - 08.05.2014
and he say me i must type the playerID in every command i type.
and i already type his ID but he say me type his ID .
Re: ID bug when i do /rob and playerid he say write ID -
MichealScript - 08.05.2014
i fixed it.
Re: ID bug when i do /rob and playerid he say write ID -
Stanford - 08.05.2014
pawn Код:
// remove those if you've them in the top of your gamemode / filterscript or code.
#include <zcmd>
#include <sscanf2>
CMD:rob(playerid, params[])
{
new giveplayerid, string[128];
if(sscanf(params,"u", giveplayerid) return SendClientMessage(playerid, -1, "/rob [playerid]");
if(giveplayerid == INVALID_PLAYERID) return SendClientMessage(playerid, -1, "That player isn't even online or available.");
if(GetPlayerMoney(giveplayerid) >= 1 && GetPlayerMoney(giveplayerid) != 0) {
moneyrobbed = GetPlayerMoney(giveplayerid);
GivePlayerMoney(playerid, moneyrobbed); // The robbed money was given successfully (edit the code if you dont want that you lose all the money.
format(string,sizeof(string),"You've robbed (%d) successfully from that player, keep up the good work.",robbedmoney);
SendClientMessage(playerid, -1, string);
return 1;
}
i hope that I helped you, it was just a random code.. not tested.
Re: ID bug when i do /rob and playerid he say write ID -
MichealScript - 08.05.2014
Yes but i found it was bug in plugins .