*** Terrible Title Removed
#1

CMDpec(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, error, "You aren't an admin!");
new id, string[256], slot, Float, Float:y, Float:z, Float:a;
if(sscanf(params, "s[256]I[1]", string, slot))
if(playerid == id) return SendClientMessage(playerid, error, "You can't spectate yourself!");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, error, "That player is not connected!");
if(PlayerInfo[playerid][pAdmin] > 0 && IsPlayerConnected(id))
{
if(isnull(params) || isnull(string)) SendClientMessage(playerid, error, "Syntax - /spec(tate) [playerid/'off']");
if(!strcmp(string, "off", true) || !strcmp(string, "stop", true) && IsSpectating[playerid] == false)
return SendClientMessage(playerid, error, "You aren't spectating anyone!");
if(!strcmp(string, "off", true) || !strcmp(string, "stop", true) && IsSpectating[playerid] == true)
{
IsSpectating[playerid] = false;
TogglePlayerSpectating(playerid, 0);
SetPlayerPos(playerid, SpecX[playerid], SpecY[playerid], SpecZ[playerid]);
SetPlayerFacingAngle(playerid, SpecA[playerid]);
SendClientMessage(playerid, success, "You are no longer spectating!");
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!strcmp(string, i, true))
{
new string1[256];
format(string1, sizeof(string1), "You are now spectating %s (%d)! Type /spec(tate) off/stop to stop.", RPName(id), id);
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, a);
SpecX[playerid] = x;
SpecY[playerid] = y;
SpecZ[playerid] = z;
SpecA[playerid] = a;
IsSpectating[playerid] = true;
TogglePlayerSpectating(playerid, 1);
SendClientMessage(playerid, success, string1);
if(IsPlayerInAnyVehicle(id)) PlayerSpectateVehicle(playerid, GetPlayerVehicleID(id), 1);
if(!IsPlayerInAnyVehicle(id)) PlayerSpectatePlayer(playerid, id, 1);
}
}
}
return 1;
}
Reply
#2

what's your issue?
Reply
#3

Arguement mismatch for argument number 2
Reply
#4

which line? show us the line
Reply
#5

f(!strcmp(string, i, true))
Reply
#6

Please help
Reply
#7

it's:

Код:
if(!strcmp(string, i,true))
not f(!strcmp(string, i, true))
Reply
#8

Yea James thats what i ment but it dont work
Reply
#9

Код:
if(!strcmp(string, strval(i), true))
Reply
#10

Quote:
Originally Posted by Youice
Посмотреть сообщение
Код:
if(!strcmp(string, strval(i), true))
After Using this i get the Same problem with arguement 1 but no Errors with ARGUMENT 2
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)