02.12.2018, 19:03
Hello
I have problem, how fix this ?
error 017: undefined symbol "GetPlayerPoolSize"
warning 214: possibly a "const" array argument was intended: "name"
warning 214: possibly a "const" array argument was intended: "string"
I have problem, how fix this ?
error 017: undefined symbol "GetPlayerPoolSize"
Код:
forward SecondUpdate();
public SecondUpdate()
{
for(new playerid, j = GetPlayerPoolSize(); playerid <= j; playerid++)
{
if(IsPlayerConnected(playerid))
{
if(Player[playerid][ShowMouse])
{
ShowPlayerMouse(playerid, true);
}
}
}
return 1;
}
Код:
stock IsRPName(name[], minname = 3, bool:firstupperthenlower = true) //By Nickk888
{
new count, checknumcount, where, tmpname[24], tmpsname[24];
new len = strlen(name);
for(new i; i < len; i++) {
if(name[i] == '_')
count++,
where = i;
switch(name[i]) {
case 'A'..'Z', 'a'..'z', '_':
checknumcount++;
}
}
if(count != 1 || (where < minname || len < ((where + 1) + minname)) || checknumcount != len)
return 0;
strmid(tmpname, name, 0, where);
strmid(tmpsname, name, where+1, len);
checknumcount = 0;
if(firstupperthenlower) {
switch(tmpname[0]) {
case 'A'..'Z':
checknumcount++;
}
for(new i = 1, j = strlen(tmpname); i < j; i++){
switch(tmpname[i]) {
case 'a'..'z':
checknumcount++;
}
}
switch(tmpsname[0]) {
case 'A'..'Z':
checknumcount++;
}
for(new i = 1, j = strlen(tmpsname); i < j; i++){
switch(tmpsname[i]) {
case 'a'..'z':
checknumcount++;
}
}
if((checknumcount + 1) != len)
return 0;
}
return 1;
}
Код:
stock bool:IsStrValid(string[])
{
new num;
new len = strlen(string);
for(new i; i < len; i++)
switch(string[i])
{
case 'A'..'Z':num++;
case 'a'..'z':num++;
case '0'..'9':num++;
}
if(num == len) return true;
else return false;
}

