IsNumeric
if(dialogid == DIALOG_CLICK_HEALTH)
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
if(response == 1)
{
if(!IsNumeric(inputtext))
{
SendClientMessage(playerid,COLOR_RED," ERROR: Kein gültiger Wert!");
return 1;
}
new hp = strval(inputtext);
if(hp < 0 || hp > 100)
{
SendClientMessage(playerid,COLOR_RED," ERROR: Health zwischen 0 und 100!");
return 1;
}
format(string,sizeof(string),"/sethp %d %d",pClicked[playerid],hp);
OnPlayerCommandText(playerid,string);
}
}
return 1;
}
if(dialogid == DIALOG_CLICK_INT)
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
if(response == 1)
{
if(!IsNumeric(inputtext))
{
SendClientMessage(playerid,COLOR_RED," ERROR: Das Interior muss eine Zahl sein!");
return 1;
}
new int = strval(inputtext);
format(string,sizeof(string),"/setplayerint %d %d",pClicked[playerid],int);
OnPlayerCommandText(playerid,string);
}
}
return 1;
}
ReturnUser (1 CMD)
if(strcmp(cmd,"/knast",true) == 0)
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_WHITE,"NUTZUNG: /knast [knastid 1-3] [playerid] [zeit(in Minuten)] [grund]");
return 1;
}
new knastid = strval(tmp);
if(knastid < 1 || knastid > 3)
{
SendClientMessage(playerid,COLOR_WHITE," KnastID nicht höher als 3 oder kleiner als 1!");
return 1;
}
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_WHITE,"NUTZUNG: /knast [knastid 1-3] [playerid] [zeit(in Minuten)] [grund]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(!IsPlayerConnected(giveplayerid))
{
SendClientMessage(playerid,COLOR_WHITE," Spieler ist nicht Online!");
return 1;
}
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_WHITE,"NUTZUNG: /knast [knastid 1-3] [playerid] [zeit(in Minuten)] [grund]");
return 1;
}
new zeit = strval(tmp);
if(zeit < 1 || zeit > 120)
{
SendClientMessage(playerid,COLOR_WHITE," Zeit nur zwischen 1 und 120 Minuten!");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid,COLOR_WHITE,"NUTZUNG: /knast [knastid 1-3] [playerid] [zeit(in Minuten)] [grund]");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string,sizeof(string)," AdmCmd: %s hat %s für %d Minuten in Knast%d gesteckt. Grund: %s",sendername,giveplayer,zeit,knastid,result);
ABroadCast(COLOR_LIGHTRED,string,1);
format(string,sizeof(string)," Admin %s hat dich für %d Minuten in Knast%d gesteckt. Grund: %s",sendername,zeit,knastid,result);
SendClientMessage(giveplayerid,COLOR_LIGHTRED,string);
Knast[giveplayerid] = knastid;
KnastTime[giveplayerid] = zeit;
SetPlayerToKnast(giveplayerid,knastid);
}
return 1;
}
Hoffe es Kann einer Helfen
lg Dave
bitte helft mir...
//EDIT
C:\Users\Marcel\Desktop\GTA\LoL.pwn(292) : warning 203: symbol is never used: "IsNumeric"
C:\Users\Marcel\Desktop\GTA\LoL.pwn(292 -- 42676) : warning 203: symbol is never used: "ReturnUser"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 572 bytes
Code size: 5140 bytes
Data size: 20232008 bytes
Stack/heap size: 32768 bytes; estimated max. usage=1105025 cells (4420100 bytes)
Total requirements:20270488 bytes
2 Warnings.