30.08.2009, 14:20
Quote:
Originally Posted by ► James_Alex
can you show us your cmd and idx sources ?
|
Код:
new string[256]; dcmd(login,5,cmdtext); dcmd(register,8,cmdtext); new cmd[128], tmp[128], idx; cmd = strtok(cmdtext, idx); if(!strcmp("/job", cmd, true)) if(Logged[playerid] == 1) { tmp = strtok(cmdtext, idx); if (!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "[ ! ] USAGE: /job <JobName>") && SendClientMessage(playerid,COLOR_WHITE,"[ ! ] List of jobs: cop, swat, robber"); if (!strcmp("cop", tmp, true)) if(IsPlayerJob(playerid) == 1) { if(GetPlayerMoney(playerid) <= 25) return SendClientMessage(playerid,COLOR_RED,"[ ! ] Not enough Money! You need 2000!"); GivePlayerMoney(playerid, -2000); RemovePlayerJob(playerid); SetPlayerJob(playerid,2); SendClientMessage(playerid,TEAM_COP_COLOR,"[ ! ] Cheif of police: Welcome to officer son !"); SendClientMessage(playerid,ADMIN_MSG,"[ ! ] You are kicked for ( PLEASE RESTART GAME :) )"); Kick(playerid); return 1; }