- เครดิต
- 31
- ความรู้
-
- เงิน $
-
- ความดี
-
|
if(strcmp(cmd, "/reset", true) == 0) // hellonanza1 ใครลบขอให้เซิฟล่ม ไม่มีคนเล่น
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /reset [playerid/PartOfName] [reason]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 4)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
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_GRAD2, "USAGE: /reset [playerid/PartOfName] [reason]");
return 1;
}
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "AdmCmd: %s ถูกรีข้อมูลโดยแอดมิน %s, สาเหตุ: %s", giveplayer, sendername, (result));
SendClientMessageToAll(COLOR_LIGHTRED, string);
PlayerInfo[giveplayerid][pLevel] = 1;
PlayerInfo[giveplayerid][pFull] = 300;
PlayerInfo[giveplayerid][pLuck] = 300;
PlayerInfo[giveplayerid][pSHealth] = 0.0;
PlayerInfo[giveplayerid][pHealth] = 50.0;
PlayerInfo[giveplayerid][pPos_x] = 0;
PlayerInfo[giveplayerid][pPos_y] = 0;
PlayerInfo[giveplayerid][pPos_z] = 0;
PlayerInfo[giveplayerid][pInt] = 0;
PlayerInfo[giveplayerid][pPcarkey] = 999;
PlayerInfo[giveplayerid][pPnumber] = 0;
PlayerInfo[giveplayerid][pLocal] = 255;
PlayerInfo[giveplayerid][pTeam] = 3;
PlayerInfo[giveplayerid][pModel] = 264;
PlayerInfo[giveplayerid][pPhousekey] = 255;
PlayerInfo[giveplayerid][pPbiskey] = 255;
PlayerInfo[giveplayerid][pAccount] = 20000;
PlayerInfo[giveplayerid][pReg] = 1;
PlayerInfo[giveplayerid][pPgatekey] = 0;
PlayerInfo[giveplayerid][pBanned] = 0;
PlayerInfo[giveplayerid][pPoint] = 0;
return 1;
}
}
}
else
{
format(string, sizeof(string), " %d ไม่ได้อยู่ในเกม", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
|
|