CMD:contract(playerid, params[]) {
if(playerVariables[playerid][pAdminDuty] == 1) {
SendClientMessage(playerid, COLOR_RED, "You can not contract somebody while on administrator duty.");
else //Invalid expression, assuming 0.
new contracted, //Expected token ";" , found "new".
contractreason,
contractprice; //Error, Never used.
contracted = playerid
contractreason = "" //Empty Statement [start]
SendClientMessage(playerid, COLOR_GREY, "You have contracted %d for %d. Reason: %d.", contracted, contractprice, contractreason);
}
if(playerVariables[playerid][pGroup] == 10); //Empty Statement [end]
playerVariables[contracted][pContracted] = 1;
SendClientMessage(playerid, COLOR_NICESKY, "Somebody has requested a contract on %d for %d. Reason: %d. ((If the reason isn't valid, ignore the contract.))", contracted, contractprice, contractreason);
}
}
C:\Users\Admin\Desktop\Server Uploads\vx-rp.pwn(4032) : warning 203: symbol is never used: "wantedreason"
C:\Users\Admin\Desktop\Server Uploads\vx-rp.pwn(4041) : error 029: invalid expression, assumed zero
C:\Users\Admin\Desktop\Server Uploads\vx-rp.pwn(4041 -- 4042) : warning 215: expression has no effect
C:\Users\Admin\Desktop\Server Uploads\vx-rp.pwn(4042) : error 001: expected token: ";", but found "new"
C:\Users\Admin\Desktop\Server Uploads\vx-rp.pwn(4046) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Admin\Desktop\Server Uploads\vx-rp.pwn(4046 -- 4047) : error 006: must be assigned to an array
C:\Users\Admin\Desktop\Server Uploads\vx-rp.pwn(4044) : warning 203: symbol is never used: "contractprice"
C:\Users\Admin\Desktop\Server Uploads\vx-rp.pwn(4047) : warning 204: symbol is assigned a value that is never used: "contractreason"
C:\Users\Admin\Desktop\Server Uploads\vx-rp.pwn(4046) : warning 204: symbol is assigned a value that is never used: "contracted"
C:\Users\Admin\Desktop\Server Uploads\vx-rp.pwn(4046 -- 4049) : error 036: empty statement
C:\Users\Admin\Desktop\Server Uploads\vx-rp.pwn(4046 -- 4049) : fatal error 107: too many error messages on one line
contractreason,
contractreason;
oh come on, that are really basic stuff your trying to fix... You should first go down to basics before editing a code. I strongly suggest, that you begin to look up for some tutorials...
|
CMD:contract ( playerid , params[] )
{
if(playerVariables[playerid][pAdminDuty] == 1) return SendClientMessage(playerid, COLOR_RED, "You can not contract somebody while on administrator duty.");
new Contract , CPrice , CReason[128];
if ( sscanf ( params , "uis[128]" , Contract , CPrice , CReason ) ) return SendClientMessage ( playerid , -1 , "Usage: /contract [ID] [Price] [Reason]" ) ;
if ( !IsPlayerConnected ( Contract ) ) return SendClientMessage ( playerid , -1 , "Invalid ID" ) ;
if ( Contract == playerid ) return SendClientMessage ( playerid , -1 , "You cannot contract yourself" ) ;
else
{
playerVariables[contracted][pContracted] = 1;
new str[128];
new str2[128];
new CName[MAX_PLAYER_NAME] , DName[MAX_PLAYER_NAME];
GetPlayerName ( Contract , CName , MAX_PLAYER_NAME ) ;
GetPlayerName ( playerid , DName , MAX_PLAYER_NAME ) ;
format ( str , 128 , "You have contracted %s for %i . Reason : %s" , CName , CPrice , CReason ) ;
SendClientMessage ( playerid , -1 , str ) ;
format ( str2 , 128 , "Somebody has requested a contract on %s for %i . Reason : %s ((If the reason isn't valid, ignore the contract.))" , DName , CPrice , CReason ) ;
SendClientMessage ( Contract , -1 , str2 ) ;
}
return 1;
}
if(playerVariables[playerid][pGroup] == 10);
CMD:contract ( playerid , params[] )
{
if(playerVariables[playerid][pAdminDuty] == 1) return SendClientMessage(playerid, COLOR_RED, "You can not contract somebody while on administrator duty.");
new Contract , CPrice , CReason[128];
if ( sscanf ( params , "uis[128]" , Contract , CPrice , CReason ) ) return SendClientMessage ( playerid , -1 , "Usage: /contract [ID] [Price] [Reason]" ) ;
if ( !IsPlayerConnected ( Contract ) ) return SendClientMessage ( playerid , -1 , "Invalid ID" ) ;
if ( Contract == playerid ) return SendClientMessage ( playerid , -1 , "You cannot contract yourself" ) ;
if ( !playerVariables[playerid][pGroup] == 10 ) return SendClientMessage ( playerid , COLOR_RED , "The player your trying to hire is not a hitman." ) ;
else
{
playerVariables[contracted][pContracted] = 1;
new str[128];
new str2[128];
new CName[MAX_PLAYER_NAME] , DName[MAX_PLAYER_NAME];
GetPlayerName ( Contract , CName , MAX_PLAYER_NAME ) ;
GetPlayerName ( playerid , DName , MAX_PLAYER_NAME ) ;
format ( str , 128 , "You have contracted %s for %i . Reason : %s" , CName , CPrice , CReason ) ;
SendClientMessage ( playerid , -1 , str ) ;
format ( str2 , 128 , "Somebody has requested a contract on %s for %i . Reason : %s ((If the reason isn't valid, ignore the contract.))" , DName , CPrice , CReason ) ;
SendClientMessage ( Contract , -1 , str2 ) ;
}
return 1;
}