CMD:camerabank SetPlayerCameraPos(playerid, THE COORDS OF THE CAMERA);
CMD:su(playerid, params[]) { new targetID, string[128], crime[96], playerName[2][MAX_PLAYER_NAME]; if(sscanf(params, "us", targetID, crime)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/su [playerid] [offence]"); else if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1) { if(IsPlayerConnectedEx(targetID)) { if(groupVariables[playerVariables[targetID][pGroup]][gGroupType] != 1) { GetPlayerName(playerid, playerName[0], MAX_PLAYER_NAME); GetPlayerName(targetID, playerName[1], MAX_PLAYER_NAME); format(string, sizeof(string), "Dispatch: %s has issued an arrest warrant on %s (%s).", playerName[0], playerName[1], crime); SendToGroup(playerVariables[playerid][pGroup], COLOR_RADIOCHAT, string); playerVariables[targetID][pWarrants]++; if(playerVariables[targetID][pWarrants] < 7) SetPlayerWantedLevel(targetID, playerVariables[targetID][pWarrants]); } else SendClientMessage(playerid, COLOR_GREY, "You can't place an arrest warrant on this person."); } else SendClientMessage(playerid, COLOR_GREY, "The specified player is either not connected or has not authenticated."); } return 1; }
Originally Posted by Jordiee
@pharrel If I was to make a command /camerabank I would do
Code: CMD:camerabank SetPlayerCameraPos(playerid, THE COORDS OF THE CAMERA); Not like that but yano. |
//on the playerVariables enum:
pCrimeDescription[60 char],
CMD:su(playerid, params[])
{
new
targetID,
string[128],
crime[96],
playerName[2][MAX_PLAYER_NAME];
if(sscanf(params, "us", targetID, crime)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/su [playerid] [offence]");
else if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 1) {
if(IsPlayerConnectedEx(targetID)) {
if(groupVariables[playerVariables[targetID][pGroup]][gGroupType] != 1) {
GetPlayerName(playerid, playerName[0], MAX_PLAYER_NAME);
GetPlayerName(targetID, playerName[1], MAX_PLAYER_NAME);
format(string, sizeof(string), "Dispatch: %s has issued an arrest warrant on %s (%s).", playerName[0], playerName[1], crime);
SendToGroup(playerVariables[playerid][pGroup], COLOR_RADIOCHAT, string);
playerVariables[targetID][pWarrants]++;
if(playerVariables[targetID][pWarrants] < 7)
SetPlayerWantedLevel(targetID, playerVariables[targetID][pWarrants]);
format(playerVariables[targetID][pCrimeDescription], strlen(crime), crime);
}
else SendClientMessage(playerid, COLOR_GREY, "You can't place an arrest warrant on this person.");
}
else SendClientMessage(playerid, COLOR_GREY, "The specified player is either not connected or has not authenticated.");
}
return 1;
}
CMD:mdc(playerid)
{
new string[128];
SendClientMessage(playerid, -1, "Suspects List:");
foreach(Player, i)
{
if(playerVariables[i][pWarrants] > 0)
{
format(string, 128, "Suspect: %s | Crime: %s", PlayerName,playerVariables[i][pCrimeDescription]);
SendClientMessage(playerid, -1, string);
}
}
return 1;
}
C:\Users\Jordan\Desktop\Windows\gamemodes\vx-rp.pwn(9940) : error 017: undefined symbol "PlayerName" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
CMD:mdc(playerid)
{
new string[128], PlayerName[MAX_PLAYER_NAME];
SendClientMessage(playerid, -1, "Suspects List:");
foreach(Player, i)
{
if(playerVariables[i][pWarrants] > 0)
{
format(string, 128, "Suspect: %s | Crime: %s", PlayerName,playerVariables[i][pCrimeDescription]);
SendClientMessage(playerid, -1, string);
}
}
return 1;
}