errors -
Glossy42O - 22.10.2014
I made a rape cmd idk if will it work and i get errors
PHP код:
CMD:rape(playerid,params[])
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "USAGE: /rape [Part of name/Player ID]");
if(playerid == targetid) return SendClientMessage(playerid, -1, "You can't rape yourself");
if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFFFFFFF,"{ff0000}[ERROR]: This player is not connected!");
if(IsPlayerInRangeOfPoint(targetid, 5.0, x,y,z))
{
new str[512];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name,sizeof(name));
new target[MAX_PLAYER_NAME];
GetPlayerName(targetid, target,sizeof(target));
format(str, sizeof(str), "{ff0000}You have raped %s",target);
SendClientMessage(playerid, 0xE01B1B, str);bitchslap
ApplyAnimation(playerid, "MISC", "BITCH_SLAP", 0,0,0,0,0,0,0,0,);
return 1;
}
PHP код:
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(526) : error 017: undefined symbol "x"
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(534) : error 017: undefined symbol "bitchslap"
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(535) : warning 202: number of arguments does not match definition
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(535) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(535) : warning 202: number of arguments does not match definition
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(535) : error 001: expected token: ",", but found ";"
Re: errors -
IceBilizard - 22.10.2014
pawn Код:
CMD:rape(playerid,params[])
{
new targetid, Float:x, Float:y, Float:z;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "USAGE: /rape [Part of name/Player ID]");
if(playerid == targetid) return SendClientMessage(playerid, -1, "You can't rape yourself");
if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFFFFFFF,"{ff0000}[ERROR]: This player is not connected!");
GetPlayerPos(playerid,x,y,z);
if(IsPlayerInRangeOfPoint(targetid, 5.0, x,y,z))
{
new str[512];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name,sizeof(name));
new target[MAX_PLAYER_NAME];
GetPlayerName(targetid, target,sizeof(target));
format(str, sizeof(str), "{ff0000}You have raped %s",target);
SendClientMessage(playerid, 0xE01B1B, str);
ApplyAnimation(playerid, "MISC", "BITCH_SLAP", 0,0,0,0,0,0,0);
return 1;
}
Re: errors -
Glossy42O - 22.10.2014
Thanks and
new errors xd
PHP код:
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(540) : warning 217: loose indentation
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(540) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(540) : error 017: undefined symbol "cmd_ar"
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(540) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(540) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
PHP код:
CMD:ar(playerid,params[]) return cmd_arrest(playerid, params);//This line
CMD:arrest(playerid,params[])
{
new targetid, str[512];
if(IsPlayerPolice[playerid] != 1) return SendClientMessage(playerid,-1,"{ff0000}[ERROR]: You are not cop.");
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1,"USAGE: /arrest [Part of Name/Player ID]");
if(playerid == targetid) return SendClientMessage(playerid, 0xFFFFFFF, "{ff0000}ERROR: You can't arrest yourself");
if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFFFFFFF,"{FF0000}ERROR: This player is not connected!");
if(IsPlayerPolice[targetid] == 1) return SendClientMessage(playerid, -2, "{ff0000}You cant arrest another police officer!");
if(!SetPlayerAttachedObject(targetid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,-81.700035, 0.891999, 1.000000, 1.168000)) return SendClientMessage(playerid,-1,"[ERROR] This player is not cuffed!");
new name [MAX_PLAYER_NAME];
GetPlayerName(playerid, name,sizeof(name));
new target[MAX_PLAYER_NAME];
GetPlayerName(targetid, target, sizeof(target));
format(str, sizeof(str), "{ff0000}You have arrested %s",target);
SendClientMessage(playerid, 0xE01B1B, str);
GameTextForPlayer(playerid, "ARRESTED",2000,2);
SendClientMessageToAll(-1, "%s Has been sent to jail");
SetPlayerInterior(playerid, 6);
ResetPlayerWeapons(playerid);
return 1;
}
Re: errors -
IceBilizard - 22.10.2014
try this
pawn Код:
CMD:ar(playerid,params[])
{
return cmd_arrest(playerid, params);
}
CMD:arrest(playerid,params[])
{
new targetid, str[512];
if(IsPlayerPolice[playerid] != 1) return SendClientMessage(playerid,-1,"{ff0000}[ERROR]: You are not cop.");
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1,"USAGE: /arrest [Part of Name/Player ID]");
if(playerid == targetid) return SendClientMessage(playerid, 0xFFFFFFF, "{ff0000}ERROR: You can't arrest yourself");
if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFFFFFFF,"{FF0000}ERROR: This player is not connected!");
if(IsPlayerPolice[targetid] == 1) return SendClientMessage(playerid, -2, "{ff0000}You cant arrest another police officer!");
if(!SetPlayerAttachedObject(targetid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,-81.700035, 0.891999, 1.000000, 1.168000)) return SendClientMessage(playerid,-1,"[ERROR] This player is not cuffed!");
new name [MAX_PLAYER_NAME];
GetPlayerName(playerid, name,sizeof(name));
new target[MAX_PLAYER_NAME];
GetPlayerName(targetid, target, sizeof(target));
format(str, sizeof(str), "{ff0000}You have arrested %s",target);
SendClientMessage(playerid, 0xE01B1B, str);
GameTextForPlayer(playerid, "ARRESTED",2000,2);
SendClientMessageToAll(-1, "%s Has been sent to jail");
SetPlayerInterior(playerid, 6);
ResetPlayerWeapons(playerid);
return 1;
}
Re: errors -
Glossy42O - 22.10.2014
Now i have this lol
PHP код:
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(540) : warning 217: loose indentation
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(540) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(540) : error 017: undefined symbol "cmd_ar"
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(540) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(540) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
PHP код:
CMD:arrest(playerid,params[])//This
{
new targetid, str[512];
if(IsPlayerPolice[playerid] != 1) return SendClientMessage(playerid,-1,"{ff0000}[ERROR]: You are not cop.");
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1,"USAGE: /arrest [Part of Name/Player ID]");
if(playerid == targetid) return SendClientMessage(playerid, 0xFFFFFFF, "{ff0000}ERROR: You can't arrest yourself");
if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFFFFFFF,"{FF0000}ERROR: This player is not connected!");
if(IsPlayerPolice[targetid] == 1) return SendClientMessage(playerid, -2, "{ff0000}You cant arrest another police officer!");
if(!SetPlayerAttachedObject(targetid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,-81.700035, 0.891999, 1.000000, 1.168000)) return SendClientMessage(playerid,-1,"[ERROR] This player is not cuffed!");
new name [MAX_PLAYER_NAME];
GetPlayerName(playerid, name,sizeof(name));
new target[MAX_PLAYER_NAME];
GetPlayerName(targetid, target, sizeof(target));
format(str, sizeof(str), "{ff0000}You have arrested %s",target);
SendClientMessage(playerid, 0xE01B1B, str);
GameTextForPlayer(playerid, "ARRESTED",2000,2);
SendClientMessageToAll(-1, "%s Has been sent to jail");
SetPlayerInterior(playerid, 6);
ResetPlayerWeapons(playerid);
return 1;
}
Re: errors -
IceBilizard - 22.10.2014
remove
pawn Код:
CMD:ar(playerid,params[])
{
return cmd_arrest(playerid, params);
}
then compile if it works then copy cmd:arrest command and paste at any where and change CMD:arrest to CMD:ar like
pawn Код:
CMD:ar(playerid,params[])
{
return cmd_arrest(playerid, params);
}
Re: errors -
gurmani11 - 22.10.2014
are you sure you have zcmd?
+ where have you put it ? under other cmds?
Re: errors -
Glossy42O - 22.10.2014
I know where to to put:P when i added /rape it maked errors in /arrest anyways
new errors when i removed watcha told me
line
CMD:arrest(playerid,params[])
PHP код:
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(542) : warning 217: loose indentation
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(542) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(542) : error 017: undefined symbol "cmd_arrest"
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(542) : error 029: invalid expression, assumed zero
C:\Users\yan\Desktop\Cops And Robbers\gamemodes\LSCNR.pwn(542) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
Re: errors -
gurmani11 - 22.10.2014
Oh thanx for exaggerating
pawn Код:
CMD:rape(playerid,params[])
{
new targetid;
if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "USAGE: /rape [Part of name/Player ID]");
if(playerid == targetid) return SendClientMessage(playerid, -1, "You can't rape yourself");
if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFFFFFFF,"{ff0000}[ERROR]: This player is not connected!");
if(IsPlayerInRangeOfPoint(targetid, 5.0, x,y,z))
{
new str[512];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name,sizeof(name));
new target[MAX_PLAYER_NAME];
GetPlayerName(targetid, target,sizeof(target));
format(str, sizeof(str), "{ff0000}You have raped %s",target);
SendClientMessage(playerid, 0xE01B1B, str);bitchslap
ApplyAnimation(playerid, "MISC", "BITCH_SLAP", 0,0,0,0,0,0,0,0,);
}// you forgot it
return 1;
}
Re: errors -
Glossy42O - 22.10.2014
Thanks :P
btw will rape work?
and that anim is a rape anim?