These lines is the locations where the /call is writeable...
new Float:Locations[15][3] = {
{1242.5491,1425.8359,10.8203},
{1471.6235,1427.9355,10.8203},
{2112.1749,1381.4261,10.8203},
{2310.9152,1381.6161,10.8203},
{2409.4855,1381.6128,10.8203},
{2099.5593,1202.0027,10.8203},
{2395.8723,1201.8759,10.8203},
{2158.0876,1018.0305,10.8125},
{2558.1509,1014.7099,10.8125},
{2073.7469,736.9877,10.8203},
{2163.4532,704.9913,10.8280},
{2560.5582,704.9595,10.8280},
{1286.9607,1266.8053,10.8203},
{1690.6462,1266.9874,10.8203},
{1595.2450,1784.0334,10.8203}
};
if(strcmp(cmd, "/call", true) == 0 || strcmp(cmd, "/tf", true) ==0 )
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, Locations[0], Locations[1], Locations[2]));
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
//SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
SendClientMessage(playerid, COLOR_GRAD2, "Use: /call [number]");
return 1;
}
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GRAD2, " You should logg in.");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new phonenumb = strval(tmp);
if(phonenumb == 911)
{
SendClientMessage(playerid, COLOR_GREY, "911 is not available yet.");
//ShowEmergencyOneDialog(playerid,DEMERGENCY1);
return 1;
}
if(phonenumb == PlayerInfo[playerid][pPnumber])
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
SendClientMessage(playerid, COLOR_GRAD2, " The numner is busy.");
return 1;
}
if(Mobile[playerid] != 9999)
{
SendClientMessage(playerid, COLOR_GRAD2, "You are already in a call.");
return 1;
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
{
giveplayerid = i;
Mobile[playerid] = giveplayerid;
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PhoneOnline[giveplayerid] > 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
SendClientMessage(playerid, COLOR_GREY, " The number is busy,please try again later.");
return 1;
}
}
}
}
}
}
SendClientMessage(playerid, COLOR_GRAD2, " The number is busy now.");
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
}
return 1;
}
}
error 035: argument type mismatch (argument 3)
The Line: if(IsPlayerInRangeOfPoint(playerid, 3.0, Locations[0], Locations[1], Locations[2]));
new Locations = random(3);
pawn Код:
|
new Float:Locations[][3] = {
if(strcmp(cmd, "/call", true) == 0 || strcmp(cmd, "/tf", true) ==0 )
{
for(new i=0;i<sizeof(Locations);i++)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, Locations[i][0], Locations[i][1], Locations[i][2]))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
//SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
SendClientMessage(playerid, COLOR_GRAD2, "Use: /call [number]");
return 1;
}
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GRAD2, " You should logg in.");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new phonenumb = strval(tmp);
if(phonenumb == 911)
{
SendClientMessage(playerid, COLOR_GREY, "911 is not available yet.");
//ShowEmergencyOneDialog(playerid,DEMERGENCY1);
return 1;
}
if(phonenumb == PlayerInfo[playerid][pPnumber])
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
SendClientMessage(playerid, COLOR_GRAD2, " The numner is busy.");
return 1;
}
if(Mobile[playerid] != 9999)
{
SendClientMessage(playerid, COLOR_GRAD2, "You are already in a call.");
return 1;
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
{
giveplayerid = i;
Mobile[playerid] = giveplayerid;
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PhoneOnline[giveplayerid] > 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
SendClientMessage(playerid, COLOR_GREY, " The number is busy,please try again later.");
return 1;
}
}
}
}
}
}
SendClientMessage(playerid, COLOR_GRAD2, " The number is busy now.");
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_STOPUSECELLPHONE);
return 1;
}
}
SendClientMessage(playerid, COLOR_GRAD2, " You can't call anyone at this location.");
return 1;
}